/* Le Bandit 7 Com — mechanics guide theme (navy / teal / amber) */
:root {
  --navy-deep: #071018;
  --navy: #0c1828;
  --navy-mid: #122238;
  --navy-light: #1a3050;
  --teal: #1e8a8a;
  --teal-bright: #2ec4b6;
  --amber: #f0a030;
  --amber-soft: #ffc96a;
  --text: #e4edf5;
  --muted: #8aa4b8;
  --border: rgba(46, 196, 182, 0.22);
  --border-amber: rgba(240, 160, 48, 0.35);
  --radius: 4px;
  --radius-sm: 2px;
  --wrap: min(calc(100% - 2.5rem), 1160px);
  --section-y: clamp(4rem, 5vw, 5rem);
  --section-y-compact: clamp(2.25rem, 3.5vw, 2.75rem);
  --card-surface: var(--navy-mid);
  --font: "IBM Plex Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--amber-soft);
}

.wrap {
  width: var(--wrap);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 1.25rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--amber);
  color: var(--navy-deep);
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 16, 24, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header-minimal {
  position: static;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
  min-height: 3.25rem;
}

@media (min-width: 901px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.25rem;
    flex-wrap: nowrap;
  }

  .site-nav {
    justify-self: center;
  }

  .header-actions {
    margin-left: 0;
    justify-self: end;
  }
}

.brand {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--amber);
}

.header-brand {
  flex-shrink: 0;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-bright);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.lang-switch {
  position: relative;
}

.lang-switch-btn {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.65rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.lang-switch-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 9rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 200;
}

.lang-switch.is-open .lang-switch-menu {
  display: block;
}

.lang-switch-menu a {
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.lang-switch-menu a:hover,
.lang-switch-menu a[aria-current="true"] {
  color: var(--teal-bright);
  background: rgba(46, 196, 182, 0.08);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 4;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Hero */
.hero-guide {
  padding: clamp(2.25rem, 4.5vw, 3.25rem) 0;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 55%);
  border-bottom: 2px solid var(--border-amber);
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin: 0 0 0.75rem;
}

.hero-copy h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52ch;
}

.hero-cta {
  margin-top: 0.15rem;
}

.hero-frame img {
  width: 100%;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--amber-soft);
  color: var(--navy-deep);
}

/* Fact strip */
.fact-strip {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.fact-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .fact-strip .fact-strip-grid.wrap {
    width: min(calc(var(--wrap) - 2rem), calc(100% - clamp(1rem, 2.5vw, 1.25rem) * 2));
    margin-inline-start: auto;
    margin-inline-end: clamp(1rem, 2.5vw, 1.25rem);
  }
}

@media (min-width: 1024px) {
  .fact-strip .fact-strip-grid.wrap {
    width: min(calc(var(--wrap) - 3rem), calc(100% - clamp(1rem, 2.5vw, 1.25rem) * 2));
    margin-inline-end: max(clamp(1rem, 2.5vw, 1.25rem), calc((100% - var(--wrap)) / 2 + 0.5rem));
  }
}

.fact-cell {
  margin: 0;
  display: grid;
  grid-template-rows: 2.75em 1.45em;
  align-content: center;
  justify-items: center;
  min-height: 4.5rem;
  padding: 0.7rem 0.35rem;
  text-align: center;
}

.fact-cell + .fact-cell {
  border-left: 1px solid var(--border);
}

.fact-cell dt {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  margin: 0;
  padding: 0 0.12rem;
  font-size: clamp(0.54rem, 1.65vw, 0.68rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--teal-bright);
}

.fact-cell dd {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  margin: 0;
  font-size: clamp(0.8rem, 2.1vw, 0.95rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Sections */
.section {
  padding: var(--section-y) 0;
}

.section-alt {
  background: var(--navy);
}

.section-mechanics-compact {
  padding: var(--section-y-compact) 0;
}

.section-mechanics-compact .section-title {
  margin-bottom: 0.75rem;
}

.section-title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.meta-line {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 68ch;
}

.section p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.65;
}

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

/* Numbered steps */
.steps-numbered {
  display: grid;
  gap: 1rem;
  counter-reset: step;
  grid-auto-rows: 1fr;
}

@media (min-width: 640px) {
  .steps-numbered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .steps-numbered {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step-card {
  background: var(--card-surface);
  border: 1px solid var(--border);
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm);
  counter-increment: step;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.step-card::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.step-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.step-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Base game split + schematic */
.base-game-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .base-game-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.base-game-split > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.grid-schematic {
  box-sizing: border-box;
  width: clamp(160px, 42vw, 190px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4px;
  flex-shrink: 0;
  margin-inline: auto;
  padding: 0.75rem;
  background: var(--navy-deep);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .grid-schematic {
    width: clamp(180px, 16vw, 210px);
  }
}

@media (min-width: 1024px) {
  .grid-schematic {
    width: clamp(210px, 18vw, 240px);
  }
}

.grid-schematic-cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.grid-schematic-cell.is-hit {
  background: rgba(240, 160, 48, 0.25);
  border-color: var(--amber);
}

.schematic-caption {
  margin: 0;
  width: 100%;
  max-width: min(100%, 340px);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* Win formation flow */
.win-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin: 1.5rem 0;
  max-width: 100%;
}

.win-flow-step {
  background: var(--card-surface);
  border: 1px solid var(--border-amber);
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.65rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--amber-soft);
  border-radius: var(--radius-sm);
}

.win-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--teal-bright);
  font-size: 1.1rem;
  font-weight: 600;
}

@media (max-width: 560px) {
  .win-flow {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-inline: auto;
  }

  .win-flow-arrow {
    width: 100%;
    transform: rotate(90deg);
    padding: 0.15rem 0;
  }
}

/* Coins / tiers */
.tier-lines {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.tier-line {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.45;
  color: var(--text);
  border-radius: var(--radius-sm);
}

/* Hold & Win flow grid */
.hw-flow-panel {
  margin-top: 0.25rem;
}

.hw-flow-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hw-flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
}

.hw-flow-step {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.7rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.35;
  border: 1px solid var(--border);
  background: var(--card-surface);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.hw-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--teal-bright);
  font-size: 1rem;
  font-weight: 600;
}

.hw-flow-note {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.hw-flow-note p {
  margin: 0;
  max-width: none;
}

@media (max-width: 768px) {
  .hw-flow-row {
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
  }

  .hw-flow-arrow {
    width: 100%;
    transform: rotate(90deg);
    padding: 0.15rem 0;
  }
}

/* Read a spin */
.read-spin-steps {
  display: grid;
  gap: 1rem;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

@media (min-width: 640px) {
  .read-spin-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.read-spin-step {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal);
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.read-spin-step h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-bright);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.read-spin-step p {
  margin: 0;
  font-size: 0.875rem;
}

/* KPI cards */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0 0;
}

@media (min-width: 640px) {
  .kpi-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 639px) {
  .kpi-card:last-child {
    grid-column: 1 / -1;
  }
}

.kpi-card {
  background: var(--card-surface);
  border: 1px solid var(--border);
  min-height: 4.5rem;
  padding: 0.8rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius-sm);
}

.kpi-label {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 2.35em;
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--muted);
}

.kpi-value {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--amber-soft);
}

.math-follow {
  margin-top: 1rem;
}

.math-follow a {
  font-weight: 600;
}

/* Symbols teaser */
.symbols-teaser {
  background: var(--card-surface);
  border: 1px solid var(--border);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
}

.symbols-teaser .section-title {
  margin-bottom: 0.65rem;
}

.symbols-teaser p {
  margin-bottom: 0.65rem;
}

.symbols-teaser-link {
  margin: 0;
  font-weight: 600;
}

/* Hub links */
.hub-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.15rem;
  grid-auto-rows: 1fr;
}

@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-link--solo {
    grid-column: 1 / -1;
    width: calc((100% - 0.85rem) / 2);
    max-width: calc((100% - 0.85rem) / 2);
    justify-self: center;
  }
}

@media (min-width: 960px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hub-link--solo {
    grid-column: 1 / -1;
    width: calc((100% - 1.7rem) / 3);
    max-width: calc((100% - 1.7rem) / 3);
    justify-self: center;
  }
}

.hub-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 5.5rem;
  padding: 1rem 1.1rem;
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background-color 0.15s;
  height: 100%;
}

.hub-link:hover {
  border-color: var(--teal-bright);
  background: rgba(18, 34, 56, 0.92);
}

.hub-link-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.hub-link-head strong {
  color: var(--text);
  font-size: 0.95rem;
}

.hub-arrow {
  color: var(--amber);
}

.hub-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

/* FAQ */
.faq-home-stack {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
}

.section-faq-home {
  padding-top: clamp(3.25rem, 4.5vw, 4.75rem);
  padding-bottom: clamp(3rem, 4vw, 4.25rem);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--teal-bright);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
}

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

.faq-a {
  padding: 0 1rem 0.9rem;
}

.faq-a p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Inner pages */
.page-hero-compact {
  padding: clamp(2rem, 4vw, 2.75rem) 0 1.5rem;
  background: var(--navy);
  border-bottom: 1px solid var(--border);
}

.page-hero-compact h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 600;
}

.page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

/* Data tables */
.data-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: var(--navy-mid);
  color: var(--teal-bright);
  font-weight: 600;
}

.data-table td {
  background: var(--navy-deep);
  color: var(--muted);
}

/* Footer */
.site-footer {
  padding: 1.35rem 0 1.5rem;
  background: var(--navy-deep);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  max-width: 920px;
  margin-inline: auto;
}

.footer-age-badge {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  border: 1px solid var(--border-amber);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.footer-legal-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
}

.footer-legal-row a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-legal-row a:hover {
  color: var(--teal-bright);
}

.footer-link-sep {
  color: var(--muted);
  opacity: 0.5;
}

.footer-rg-line,
.footer-editorial,
.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-divider {
  width: 3rem;
  height: 1px;
  background: var(--border);
  margin: 0.15rem 0 0.05rem;
}

/* Overflow guard */
img,
picture,
video,
svg {
  max-width: 100%;
}

main,
.site-header,
.site-footer {
  overflow-x: clip;
}

/* 404 */
.error-page {
  padding: 4rem 1rem;
  text-align: center;
}

.error-page h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

.error-page p {
  color: var(--muted);
}
