:root {
  /* Main: white. Secondary: olive, used on elements only (no large olive areas, no gradients). */
  --white: #ffffff;
  --olive: #556b2f;
  --olive-dark: #46592a;
  --olive-tint: #f3f5ec;
  --gold: #e8b931;
  --gold-ink: #3a2c00;
  --bg: var(--white);
  --surface: var(--white);
  --ink: #1f2318;
  --muted: #5b6150;
  --line: #e6e8df;
  --accent: var(--olive);
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 14px rgb(0 0 0 / 0.04);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }

/* Guide icons and screenshots keep their full, uncropped proportions. */
.hero-app-icon { display: block; margin-bottom: 20px; border-radius: 16px; }
.logo img { flex-shrink: 0; border-radius: 8px; }
.app-icon { display: block; border-radius: 16px; }
.app-information { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 24px; margin: 1.2em 0; }
.app-information > .table-wrap { min-width: 0; margin: 0; }
.download-app-icon { margin: 0 auto 16px; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.gallery-heading h2 { margin-bottom: 8px; }
.gallery-heading p { color: var(--muted); margin: 0; max-width: 60ch; }
.gallery-controls { display: flex; flex-shrink: 0; gap: 10px; }
.gallery-controls[hidden] { display: none; }
.gallery-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--olive); border-radius: 50%; background: var(--white); color: var(--olive-dark); font: inherit; font-size: 1.3rem; cursor: pointer; }
.gallery-arrow:hover:enabled { background: var(--olive-tint); }
.gallery-arrow:disabled { opacity: 0.4; cursor: default; }
.gallery-track { display: flex; align-items: flex-start; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--olive) var(--olive-tint); padding: 4px 0 16px; }
.gallery-slide { flex: 0 0 268px; min-width: 0; margin: 0; scroll-snap-align: start; }
.gallery-slide img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: var(--radius); }
.gallery-slide figcaption { margin-top: 12px; font-weight: 600; }
.gallery-status { margin: 12px 0 4px; color: var(--muted); font-size: 0.85rem; }
.gallery-status:empty { display: none; }
.image-note, .app-screen figcaption { font-size: 0.85rem; color: var(--muted); }
.image-note { margin: 0; max-width: 75ch; }
.app-screen { width: 100%; max-width: 320px; margin: 0 auto 32px; }
.app-screen img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: var(--radius); }
.app-screen figcaption { margin-top: 12px; }
.cricket-poster { max-width: 480px; }
.gallery-track:focus-visible, .gallery-arrow:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }

@media (max-width: 600px) {
  .gallery-heading { align-items: flex-start; gap: 16px; }
  .gallery-controls { gap: 6px; }
  .gallery-track { gap: 16px; }
  .gallery-slide { flex-basis: min(78vw, 268px); }
  .app-information { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .app-information > .app-icon { width: 72px; height: 72px; }
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
p, ul, ol { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--olive); color: var(--white); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Header */
.notice-bar { background: var(--gold); color: var(--gold-ink); font-size: 0.85rem; text-align: center; padding: 6px 16px; }
.site-header { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.site-nav a:hover { color: var(--olive); background: var(--olive-tint); }
.site-nav a[aria-current="page"] { color: var(--olive); font-weight: 600; box-shadow: inset 0 -2px 0 var(--olive); border-radius: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--olive); color: var(--white); font-weight: 600; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--olive); transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--olive-dark); border-color: var(--olive-dark); }
.btn-outline, .btn-ghost { background: var(--white); color: var(--olive); }
.btn-outline:hover, .btn-ghost:hover { background: var(--olive-tint); color: var(--olive-dark); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0; }

/* Hero */
.hero { background: var(--bg); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.hero .eyebrow {
  display: inline-block; color: var(--olive); background: var(--olive-tint); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.75rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 1em;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 28px; max-width: 640px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--olive); border-radius: var(--radius); padding: 14px 16px; }
.stat strong { display: block; font-size: 1.3rem; color: var(--olive); }
.stat span { font-size: 0.85rem; color: var(--muted); }

.page-hero { background: var(--bg); padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 0.35em; }
.page-hero p { color: var(--muted); max-width: 680px; margin: 0; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 0.8em; color: var(--muted); }
.breadcrumb a { color: var(--olive); text-decoration: none; }

/* Content */
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }
.content h2 { margin-top: 1.6em; }
.content h2:first-child { margin-top: 0; }
.lead { font-size: 1.12rem; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 1.2em 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.35em; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-link { color: inherit; text-decoration: none; transition: border-color 0.15s; }
.card-link:hover { border-color: var(--olive); }
.card-link:hover h3 { color: var(--olive); }
.card .icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  background: var(--olive-tint); font-size: 1.3rem; margin-bottom: 12px;
}

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 16px 16px 16px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--olive); color: var(--white); font-weight: 700; display: grid; place-items: center;
}

.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { width: 38%; color: var(--muted); font-weight: 600; }
thead th { background: var(--olive); color: var(--white); width: auto; }

.callout { border: 1px solid var(--line); border-left: 4px solid var(--olive); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4em 0; }
.callout.warn { border-left-color: #c0504d; }
.callout p:last-child { margin: 0; }

.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq[open] { border-color: var(--olive); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 1.4rem; color: var(--olive); }
.faq[open] summary::after { content: "−"; }
.faq > div { padding: 0 20px 16px; color: var(--muted); }
.faq > div p:last-child { margin: 0; }

.cta-band { background: var(--surface); border: 2px solid var(--olive); border-radius: var(--radius); padding: 32px; text-align: center; margin: 2em 0; }
.cta-band p { color: var(--muted); }
.cta-band .btn-row { justify-content: center; margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); margin-top: 64px; font-size: 0.95rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--olive); text-decoration: underline; }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--olive); margin-bottom: 0.8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-grid .logo { margin-bottom: 12px; }
.badge-18 { display: inline-block; border: 1px solid var(--olive); color: var(--olive); border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 28px; font-size: 0.85rem; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--bg); padding: 8px 16px 16px; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgb(0 0 0 / 0.06);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--olive); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 40px 0 36px; }
  .btn-row .btn { flex: 1 1 100%; }
  .cta-band { padding: 24px 16px; }
  th, td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .card-link { transition: none; }
}

/* ---------- Motion ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--olive); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}
.site-header { transition: box-shadow 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgb(0 0 0 / 0.07); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--olive); color: var(--white); font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.15); opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.15s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--olive-dark); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; scroll-padding-top: 84px; }

  /* Page-load entrance for the top section. */
  @keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .hero .wrap > *, .page-hero .wrap > * { animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .wrap > :nth-child(2), .page-hero .wrap > :nth-child(2) { animation-delay: 0.08s; }
  .hero .wrap > :nth-child(3), .page-hero .wrap > :nth-child(3) { animation-delay: 0.16s; }
  .hero .wrap > :nth-child(4) { animation-delay: 0.24s; }
  .hero .wrap > :nth-child(5) { animation-delay: 0.32s; }

  /* Reveal on scroll (classes added by main.js). */
  .js:not(.reveal-all) :where(.content > h2, .section > .wrap > h2, .card, .steps li, .table-wrap, .faq, .callout, .cta-band, .stat) {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
  }
  .js:not(.reveal-all) :where(.content > h2, .section > .wrap > h2, .card, .steps li, .table-wrap, .faq, .callout, .cta-band, .stat).is-visible {
    opacity: 1; transform: none;
  }
  .hero .stat { opacity: 1 !important; transform: none !important; }

  /* Hover lift. */
  .btn { transition: background 0.15s, color 0.15s, transform 0.2s, box-shadow 0.2s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(85 107 47 / 0.25); }
  .js:not(.reveal-all) .card-link.is-visible:hover, .card-link:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgb(0 0 0 / 0.08); }
  .faq summary::after { transition: transform 0.2s ease; }
  .faq[open] > div { animation: fade-up 0.35s ease both; }
}
