/* Shah Bet (SHB) - SBR-inspired RTL Design System + Tokens */
:root, [data-theme="dark"] {
  --bg-primary: #0b1220;
  --bg-secondary: #111d35;
  --bg-card: #152238;
  --bg-card-hover: #1b2c47;
  --bg-elevated: #1e2f4d;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #243554;
  --border-highlight: #3b82f6;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(11, 18, 32, 0.94);
  --font-sans: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --container-max: 1240px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --border-highlight: #2563eb;
  --accent-blue: #1d4ed8;
  --accent-blue-hover: #1e40af;
  --accent-gold: #d97706;
  --accent-green: #059669;
  --accent-red: #dc2626;
  --shadow-card: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(255, 255, 255, 0.95);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  line-height: 1.75;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

[data-theme="light"] a {
  color: #1d4ed8;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  background: var(--accent-blue);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  z-index: 9999;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* Reading Progress Bar */
.reading-progress-wrap {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  z-index: 1100;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
  transition: width 0.1s linear;
}

/* Container & Responsive Gutters (never touch edges) */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Sticky Dark Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none !important;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border: 2px solid var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.brand-code-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--accent-blue);
  color: #93c5fd;
}

[data-theme="light"] .brand-code-badge {
  color: #1e40af;
  background: rgba(37, 99, 235, 0.1);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--gutter);
    gap: 0.5rem;
  }
  .main-nav.open {
    display: flex;
  }
}

/* Hero Section (SBR Ranking Product Feel) */
.hero-plane {
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.18), transparent 55%),
              linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-color);
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.hero-badge-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

[data-theme="light"] .hero-badge-line {
  color: #047857;
}

.hero-h1 {
  font-size: clamp(1.65rem, 3.6vw, 2.55rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 0.9rem;
  color: var(--text-primary);
}

.hero-support {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.jump-link {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary) !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.jump-link:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

/* SBR Ranked Sportsbook Rows */
.ranking-section {
  padding-block: 2.5rem;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.book-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 230px 1fr 230px;
  gap: 1.35rem;
  align-items: center;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.book-row:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.book-row.top-pick {
  border: 2px solid var(--accent-gold);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.06) 100%);
}

.rank-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.book-row.top-pick .rank-ribbon {
  background: var(--accent-gold);
  color: #0b1220;
}

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

.book-logo-wrap {
  width: 140px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.book-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.book-tag {
  font-size: 0.8rem;
  color: #60a5fa;
  font-weight: 700;
}

.book-rating-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: var(--bg-elevated);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
}

.rating-score {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.rating-stars {
  color: var(--accent-gold);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.book-details {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.book-offer-line {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.12);
  border-right: 4px solid var(--accent-blue);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
}

.book-pros {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.book-pros li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.book-pros li::before {
  content: "✓";
  color: var(--accent-green);
  font-weight: 900;
  flex-shrink: 0;
}

.book-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color);
}

.book-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}

.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.96rem;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary-cta:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
}

.btn-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none !important;
}

.btn-secondary-cta:hover {
  border-color: var(--accent-blue);
}

.btn-review-link {
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-secondary) !important;
  padding-top: 0.2rem;
}

@media (max-width: 960px) {
  .book-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .book-identity {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .book-logo-wrap {
    margin-bottom: 0;
  }
}

/* Content Sections & Typography */
.content-section {
  padding-block: 2.25rem;
  border-top: 1px solid var(--border-color);
}

.section-h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.35;
}

.section-h3 {
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 1.6rem;
  margin-bottom: 0.65rem;
}

p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  text-align: justify;
}

ul.content-list, ol.content-list {
  margin-bottom: 1.25rem;
  padding-right: 1.4rem;
  color: var(--text-secondary);
}

ul.content-list li, ol.content-list li {
  margin-bottom: 0.5rem;
}

/* Guide Cards Grid */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-top: 1.25rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.35rem;
}

.guide-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

/* Comparison Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-block: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.92rem;
}

.compare-table th, .compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

.compare-table th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 800;
}

/* Editorial E-E-A-T Box */
.eeat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-block: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
}

.eeat-meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.eeat-meta strong {
  color: var(--text-primary);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.faq-item summary {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent-blue);
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Floating Utility Tools (Theme, TOC, Scroll Up/Down) */
.floating-tools {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tool-btn:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.floating-toc-panel {
  position: fixed;
  bottom: 4.8rem;
  left: 4.5rem;
  width: min(320px, calc(100vw - 2.5rem));
  max-height: 65vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-card);
  z-index: 1060;
  display: none;
}

.floating-toc-panel.open {
  display: block;
}

.floating-toc-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.floating-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
}

.floating-toc-list a {
  color: var(--text-secondary);
  display: block;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
}

.floating-toc-list a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-block: 3rem 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.rg-disclaimer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.15rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-red);
  color: #fff;
  font-weight: 900;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-left: 0.5rem;
}
