:root {
  --ink: #10231f;
  --muted: #64716d;
  --line: #dfe6e0;
  --paper: #fbfcf8;
  --white: #ffffff;
  --green: #087b55;
  --deep: #07392c;
  --lime: #9cff57;
  --gold: #d8a73f;
  --blue: #205177;
  --red: #a73334;
  --violet: #553b8d;
  --shadow: 0 18px 44px rgba(14, 39, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 12px 42px;
  background: rgba(251, 252, 248, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

.brand-badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--deep);
  border: 2px solid var(--lime);
  border-radius: 8px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.navlinks a,
.ghost-btn,
.text-link {
  padding: 9px 12px;
  color: var(--deep);
  font-weight: 800;
  border-radius: 8px;
}

.navlinks a:hover,
.ghost-btn:hover,
.text-link:hover {
  background: #e9f4ed;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-btn span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--deep);
}

.searchbox {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 250px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.searchbox label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.searchbox input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 44px;
  align-items: center;
  padding: 64px 42px 44px;
}

.hero h1,
.section-title h2 {
  margin: 0;
  line-height: 1.02;
}

.hero h1 {
  max-width: 840px;
  font-size: 64px;
}

.section-title h2 {
  font-size: 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  max-width: 730px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.dark-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  font-weight: 900;
  border-radius: 8px;
}

.primary-btn {
  color: #09291f;
  background: var(--lime);
}

.dark-btn {
  color: #fff;
  background: var(--deep);
}

.soft-btn {
  color: var(--deep);
  background: #edf6ef;
  border: 1px solid #cfe3d4;
}

.register-cta {
  min-height: 52px;
  padding: 14px 22px;
  color: #071f18;
  font-size: 17px;
  font-weight: 950;
  background: linear-gradient(135deg, #baff5f, #57f091 52%, #f4c84a);
  border: 2px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 34px rgba(83, 240, 145, 0.32), 0 0 0 4px rgba(156, 255, 87, 0.12);
}

.register-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(83, 240, 145, 0.42), 0 0 0 4px rgba(156, 255, 87, 0.18);
}

.mobile-register-cta {
  display: none;
}

.visual-panel {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.visual-panel img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.section {
  padding: 58px 42px;
}

.section-title {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
}

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

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

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

.card,
.metric,
.step,
.faq-item,
.issue-row,
.keyword-pill {
  border-radius: 8px;
}

.card,
.step,
.faq-item {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.card h3,
.step h3,
.faq-item h3 {
  margin: 8px 0;
  line-height: 1.15;
}

.card p,
.step p,
.faq-item p,
.metric p,
.issue-row p {
  color: var(--muted);
}

.kicker,
.card small,
.metric span,
.step span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 30px 42px;
  color: rgba(255, 255, 255, 0.78);
  background: #101817;
}

.footer strong {
  color: #fff;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: end;
}

.matrix-body {
  background:
    linear-gradient(120deg, rgba(7, 57, 44, 0.94), rgba(32, 81, 119, 0.86)),
    url("assets/bg-partner-network.png") center / cover fixed;
  color: #fff;
}

.matrix-body .topbar {
  color: var(--ink);
}

.matrix-hero {
  padding: 74px 42px 36px;
}

.matrix-hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: 62px;
  line-height: 1.02;
}

.matrix-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 19px;
}

.site-card {
  position: relative;
  min-height: 360px;
  padding: 22px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 29, 27, 0.7);
}

.site-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.48));
}

.site-card > * {
  position: relative;
  z-index: 1;
}

.site-card span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: #09291f;
  font-weight: 900;
  background: var(--lime);
  border-radius: 8px;
}

.site-card h2 {
  margin: 18px 0 10px;
  font-size: 30px;
  line-height: 1.05;
}

.site-card p {
  color: rgba(255, 255, 255, 0.78);
}

.site-card .primary-btn {
  margin-top: 14px;
}

.site-card.download { background-color: #0c4a37; }
.site-card.help { background-color: #214f7a; }
.site-card.games { background-color: #1a152d; }
.site-card.wallet { background-color: #193f3a; }
.site-card.urdu { background-color: #5d2732; }

.download-body {
  background: #f4f8f2;
}

.download-hero {
  background:
    linear-gradient(115deg, rgba(7, 57, 44, 0.96), rgba(10, 123, 85, 0.82)),
    url("assets/b9-home-top.png") center / cover;
  color: #fff;
}

.download-hero .lede {
  color: rgba(255, 255, 255, 0.82);
}

.app-card {
  padding: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
}

.app-card h2 {
  margin: 0 0 14px;
  font-size: 30px;
}

.app-meta {
  display: grid;
  gap: 10px;
}

.app-meta div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.version-table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.version-table th,
.version-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.help-body {
  background: #f7fafc;
}

.help-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.82fr);
  background: #fff;
}

.help-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 720px;
  margin-top: 28px;
  padding: 10px;
  background: #eef5fa;
  border: 1px solid #ccdae6;
  border-radius: 8px;
}

.help-search input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #bdd0de;
  border-radius: 8px;
}

.support-board {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #173a56;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.support-board .issue-row {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.support-board p {
  color: rgba(255, 255, 255, 0.74);
}

.games-body {
  color: #f5f7fb;
  background: #11131d;
}

.games-body .topbar {
  color: var(--ink);
}

.games-hero {
  background:
    linear-gradient(115deg, rgba(17, 19, 29, 0.96), rgba(85, 59, 141, 0.72), rgba(8, 123, 85, 0.66)),
    url("assets/b9-games-section.png") center / cover;
}

.games-hero .lede,
.games-body .section-title p,
.games-body .card p {
  color: rgba(245, 247, 251, 0.76);
}

.games-body .card {
  color: #fff;
  background: #1b2030;
  border-color: #31384b;
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.game-tabs button {
  min-height: 40px;
  padding: 9px 13px;
  color: #fff;
  background: #22283a;
  border: 1px solid #3d4660;
  border-radius: 8px;
}

.game-tabs button.active {
  color: #09291f;
  background: var(--lime);
  border-color: var(--lime);
}

.odds-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.odds-strip div {
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.wallet-body {
  background: #f6f7f3;
}

.wallet-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(234, 242, 233, 0.9)),
    url("assets/bg-city-growth.png") center / cover;
}

.wallet-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
  color: #fff;
  background: #153e39;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.method-grid span,
.keyword-pill {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-weight: 900;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.issue-list {
  display: grid;
  gap: 12px;
}

.issue-row {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.urdu-body {
  background: #fff8f3;
}

.urdu-hero {
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.86fr);
  background:
    linear-gradient(120deg, rgba(93, 39, 50, 0.94), rgba(8, 123, 85, 0.82)),
    url("assets/bg-partner-network.png") center / cover;
  color: #fff;
}

.urdu-hero .lede {
  color: rgba(255, 255, 255, 0.82);
}

.chat-panel {
  display: grid;
  gap: 12px;
}

.bubble {
  padding: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.bubble.answer {
  margin-left: 42px;
  background: #eaf6ec;
}

.urdu-script {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  direction: rtl;
  font-family: "Noto Nastaliq Urdu", "Segoe UI", Arial, sans-serif;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-cloud .keyword-pill {
  color: #5d2732;
  background: #fff;
  border-color: #efd6ca;
}

.quality-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.quality-ribbon div {
  padding: 18px;
  background: #fff;
}

.quality-ribbon strong {
  display: block;
  margin-bottom: 4px;
}

.quality-ribbon span {
  color: var(--muted);
  font-size: 13px;
}

.content-map,
.rank-plan,
.trust-stack,
.freshness-bar {
  display: grid;
  gap: 12px;
}

.content-map {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.content-map article,
.rank-plan article,
.trust-stack article,
.freshness-bar article,
.mini-table,
.cta-band,
.schema-note {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content-map article {
  min-height: 150px;
}

.content-map h3,
.rank-plan h3,
.trust-stack h3,
.freshness-bar h3 {
  margin: 6px 0 8px;
  line-height: 1.15;
}

.content-map p,
.rank-plan p,
.trust-stack p,
.freshness-bar p,
.schema-note p,
.mini-table p {
  color: var(--muted);
}

.mini-table {
  overflow-x: auto;
}

.mini-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(7, 57, 44, 0.96), rgba(8, 123, 85, 0.82)),
    url("assets/b9-home-top.png") center / cover;
  border: 0;
}

.cta-band p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.78);
}

.schema-note {
  background: #f7fafc;
  border-color: #d7e3eb;
}

.domain-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: #09291f;
  font-size: 13px;
  font-weight: 900;
  background: var(--lime);
  border-radius: 8px;
}

.warning-note {
  padding: 14px 16px;
  color: #64261e;
  background: #fff1ed;
  border: 1px solid #f1c4b8;
  border-radius: 8px;
}

.dark-section {
  color: #fff;
  background: #101817;
}

.dark-section .section-title p,
.dark-section .card p,
.dark-section .schema-note p,
.dark-section .content-map p {
  color: rgba(255, 255, 255, 0.72);
}

.dark-section .card,
.dark-section .content-map article,
.dark-section .schema-note {
  color: #fff;
  background: #182321;
  border-color: #2f403c;
}

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

.trust-stack,
.freshness-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: auto auto;
    padding: 12px 18px;
  }

  .menu-btn {
    display: block;
    justify-self: end;
  }

  .navlinks,
  .searchbox {
    grid-column: 1 / -1;
  }

  .navlinks {
    display: none;
    justify-content: start;
  }

  .navlinks.open {
    display: flex;
  }

  .searchbox {
    min-width: 0;
  }

  .hero,
  .help-hero,
  .wallet-hero,
  .urdu-hero {
    grid-template-columns: 1fr;
  }

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

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

  .content-map,
  .quality-ribbon,
  .trust-stack,
  .freshness-bar,
  .rank-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero,
  .section,
  .matrix-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .matrix-hero h1 {
    font-size: 40px;
  }

  .hero {
    padding-top: 28px;
  }

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

  .register-cta {
    width: 100%;
    min-height: 56px;
    font-size: 18px;
  }

  .section-title h2 {
    font-size: 32px;
  }

  .section-title,
  .footer {
    display: block;
  }

  .footer nav {
    justify-content: start;
    margin-top: 16px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .content-map,
  .quality-ribbon,
  .trust-stack,
  .freshness-bar,
  .rank-plan,
  .method-grid,
  .odds-strip {
    grid-template-columns: 1fr;
  }

  .cta-band {
    grid-template-columns: 1fr;
  }

  .help-search {
    grid-template-columns: 1fr;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    display: none;
  }

  body {
    padding-bottom: 76px;
  }

  .mobile-register-cta {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    color: #071f18;
    font-weight: 950;
    background: linear-gradient(135deg, #baff5f, #57f091 52%, #f4c84a);
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  }
}

/* Production page helpers */
.internal-links .text-link { display: inline-flex; margin-top: 8px; }
.guide-page .app-card { background: #fff; }
.guide-page .hero { align-items: stretch; }
.guide-page .content-map article { min-height: 160px; }
/* Official B9 logo pulled from the provided B9 site */
.brand-logo-wrap {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  overflow: hidden;
  background: #071f18;
  border: 2px solid var(--lime);
  border-radius: 8px;
}

.site-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .brand-logo-wrap {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .site-logo {
    width: 39px;
    height: 39px;
  }
}