/* =============================================
   888 Bet Login App — Industrial Brutalist CSS
   Target: 8–20 KB, mobile-first, pt-BR
   Colors: #0D0D0D / #F5F5F0 / #F5A623
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0D0D0D;
  --paper: #F5F5F0;
  --amber: #F5A623;
  --amber-dark: #C4831A;
  --border: 3px solid var(--ink);
  --border-thin: 1px solid var(--ink);
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --gap: 1.5rem;
  --max: 1200px;
  --sidebar-w: 220px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--amber);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-weight: 600;
  border: var(--border);
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* --- Screen reader only --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* --- Header --- */
.site-header {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  min-height: 64px;
  flex-wrap: nowrap;
}

.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  padding: 0.5rem 0;
}
.brand img { display: block; max-height: 36px; width: auto; }

/* --- Nav (details/summary pattern) --- */
.nav-details { flex: 1; min-width: 0; }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 2px solid var(--amber);
  cursor: pointer;
  list-style: none;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle::-webkit-details-marker { display: none; }

.toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.toggle-icon span {
  display: block;
  height: 2px;
  background: var(--paper);
  width: 100%;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border: var(--border);
  border-color: var(--amber);
  padding: 0.5rem 0;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 200;
}

.nav-menu li a {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(245,166,35,0.2);
  transition: background 0.15s;
}
.nav-menu li:last-child a { border-bottom: none; }
.nav-menu li a:hover { background: var(--amber); color: var(--ink); }

/* Desktop nav */
@media (min-width: 769px) {
  .nav-toggle { display: none; }
  .nav-details { display: flex; align-items: center; }
  .nav-details[open] > .nav-menu,
  .nav-menu {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    background: transparent;
    border: none;
    padding: 0;
    gap: 0;
  }
  .nav-menu li a {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    border-bottom: none;
    border-right: 1px solid rgba(245,166,35,0.3);
    white-space: nowrap;
  }
  .nav-menu li:last-child a { border-right: none; }
  .nav-menu li a:hover { background: rgba(245,166,35,0.15); color: var(--amber); }
}

/* Force open on desktop */
@media (min-width: 769px) {
  .nav-details { display: contents; }
  .nav-details .nav-menu { display: flex !important; }
}

/* --- Header CTAs --- */
.header-ctas {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.cta {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  padding: 0.625rem 0.875rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.03em;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.cta-signup {
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--amber);
}
.cta-signup:hover { background: var(--amber-dark); border-color: var(--amber-dark); }

.cta-login {
  background: transparent;
  color: var(--amber);
  border: 2px solid var(--amber);
}
.cta-login:hover { background: var(--amber); color: var(--ink); }

/* --- Main Layout Helpers --- */
.page-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Shared div + aside + figure pattern */
.guide-section,
.about-section,
.changelog-section,
.faq-section,
.privacy-section {
  display: flex;
  flex-direction: column;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1rem;
  gap: var(--gap);
}

@media (min-width: 900px) {
  .guide-section,
  .about-section,
  .changelog-section,
  .faq-section,
  .privacy-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }
}

/* Sidebar (left of content) */
.guide-sidebar,
.about-sidebar,
.changelog-sidebar,
.faq-sidebar,
.privacy-sidebar {
  flex-shrink: 0;
  width: 100%;
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
}

@media (min-width: 900px) {
  .guide-sidebar,
  .about-sidebar,
  .changelog-sidebar,
  .faq-sidebar,
  .privacy-sidebar {
    width: var(--sidebar-w);
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }
}

.sidebar-inner { padding: 1.25rem 1rem; }

.sidebar-inner small {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.sidebar-heading {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 0.4rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  padding: 0.625rem 0.25rem;
  min-height: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.15s;
  line-height: 1.3;
}
.sidebar-nav li:last-child a { border-bottom: none; }
.sidebar-nav li a:hover { color: var(--amber); }

/* Content wrap (figure) */
.guide-content-wrap,
.about-content-wrap,
.changelog-content-wrap,
.faq-content-wrap,
.privacy-content-wrap {
  flex: 1;
  min-width: 0;
  border: none;
}

/* --- Eyebrow / small before h2 pattern --- */
small {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* --- Headings --- */
h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  border-left: 6px solid var(--amber);
  padding-left: 0.75rem;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h4, h5, h6 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

/* --- Byline --- */
.byline {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #555;
  margin-bottom: 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* --- Body copy --- */
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); }
a:hover { color: var(--amber-dark); }

ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 700; }
em { font-style: italic; }

code, kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(13,13,13,0.06);
  border: 1px solid rgba(13,13,13,0.15);
  padding: 0.1em 0.35em;
  border-radius: 0;
}

pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-left: 4px solid var(--amber);
}

blockquote {
  border-left: 4px solid var(--amber);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: rgba(245,166,35,0.06);
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
th {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  border: var(--border-thin);
}
td {
  padding: 0.625rem 0.75rem;
  border: var(--border-thin);
  vertical-align: top;
  min-height: 44px;
}
td a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  text-decoration: underline;
  text-decoration-color: var(--amber);
}
tr:nth-child(even) td { background: rgba(13,13,13,0.03); }

.td-date {
  white-space: nowrap;
  font-size: 0.78rem;
  color: #555;
  width: 130px;
}

/* --- Stage label --- */
.stage-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--ink);
  margin-bottom: 0.5rem;
}
.stage-awareness { border-color: #0077cc; color: #0077cc; }
.stage-consideration { border-color: var(--amber); color: var(--amber-dark); }
.stage-decision { border-color: #cc3300; color: #cc3300; }

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.breadcrumb ol li + li::before {
  content: '›';
  margin-right: 0.25rem;
  color: var(--amber);
}
.breadcrumb a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

/* --- Guide header --- */
.guide-header,
.about-header,
.changelog-header,
.faq-header,
.privacy-header {
  margin-bottom: 1.5rem;
}

.guide-header small,
.about-header small,
.changelog-header small,
.faq-header small,
.privacy-header small {
  display: block;
  color: var(--amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

/* --- Hero image --- */
.guide-hero { margin-bottom: 1.5rem; border: var(--border); }
.guide-hero-img { display: block; width: 100%; height: auto; }

/* ================================================
   HOME LAYOUT
   ================================================ */
.home-main {}

.hero-section {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .hero-section {
    flex-direction: row;
    min-height: 60vh;
  }
}

/* Diagonal accent */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}

.hero-figure {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem 3rem;
  position: relative;
}

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

.hero-placeholder {
  height: 4px;
  background: var(--amber);
  margin-bottom: 1.5rem;
}

.hero-caption h1 {
  color: var(--paper);
  border-left-color: var(--amber);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
}

.home-sidebar {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid var(--amber);
  padding: 2rem 1.5rem;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .home-sidebar { width: 260px; }
}

.home-sidebar .sidebar-heading {
  color: var(--paper);
}

.home-sidebar .sidebar-nav li a {
  color: var(--paper);
  min-height: 44px;
  padding: 0.625rem 0.25rem;
  display: flex;
  align-items: center;
}

.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

.content-body {
  max-width: 780px;
}

/* Child table */
.child-table-wrap,
.changelog-table-wrap {
  margin-top: 2.5rem;
  border: var(--border);
}
.child-table-wrap > small,
.changelog-table-wrap > small {
  display: block;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
}
.child-table-wrap > h2,
.changelog-table-wrap > h2 {
  font-family: var(--mono);
  font-size: 1rem;
  padding: 0.75rem;
  border-bottom: var(--border-thin);
  margin: 0;
}

/* ================================================
   ABOUT LAYOUT
   ================================================ */
.about-main {}
.about-body { max-width: 720px; }

.author-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
}
.author-section small {
  display: block;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.author-section h2 {
  color: var(--paper);
  margin-top: 0;
  font-size: 1.4rem;
  border-left: 4px solid var(--amber);
  padding-left: 0.75rem;
}
.author-credentials {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.author-bio { font-size: 0.95rem; line-height: 1.6; }

/* ================================================
   FAQ LAYOUT
   ================================================ */
.faq-body { max-width: 720px; }
.faq-body details {
  border: var(--border-thin);
  margin-bottom: 0.75rem;
}
.faq-body details summary {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  background: rgba(13,13,13,0.03);
}
.faq-body details[open] summary { background: var(--amber); color: var(--ink); }
.faq-body details > section,
.faq-body details > p { padding: 1rem; }

/* ================================================
   CHANGELOG LAYOUT
   ================================================ */
.changelog-body { max-width: 720px; }

/* ================================================
   PRIVACY LAYOUT
   ================================================ */
.privacy-body { max-width: 720px; }

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--amber);
  display: flex;
  flex-direction: column;
}

.site-footer > div {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(245,166,35,0.2);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}
.site-footer > div:last-child { border-bottom: none; }

@media (min-width: 769px) {
  .site-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .site-footer > div {
    flex: 1;
    border-bottom: none;
    border-right: 1px solid rgba(245,166,35,0.2);
    min-width: 200px;
  }
  .site-footer > div:last-child { border-right: none; }
}

.footer-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.8rem;
  color: rgba(245,245,240,0.65);
  line-height: 1.5;
}

.footer-links small {
  display: block;
  color: var(--amber);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 0;
}

.footer-links ul li a {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  padding: 0.625rem 0;
  min-height: 44px;
  transition: color 0.15s;
}
.footer-links ul li a:hover { color: var(--amber); }

.responsible-gambling {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: rgba(245,245,240,0.6);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(245,245,240,0.4);
}

/* ================================================
   UTILITY & BODY CONTENT STYLES
   ================================================ */
.guide-body a,
.about-body a,
.changelog-body a,
.faq-body a,
.privacy-body a,
.content-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
}
.guide-body a:hover,
.about-body a:hover,
.changelog-body a:hover,
.faq-body a:hover,
.privacy-body a:hover,
.content-body a:hover {
  color: var(--amber-dark);
}

/* Ensure all inline links in body copy have visible style */
.guide-body p a,
.content-body p a {
  text-underline-offset: 2px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 0.75rem;
    gap: 0.5rem;
    min-height: 60px;
    max-height: 60px;
  }

  .brand {
    font-size: 0.85rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cta {
    font-size: 0.7rem;
    padding: 0.5rem 0.625rem;
    min-height: 44px;
  }

  .header-ctas { gap: 0.35rem; }

  h1 { font-size: 1.4rem; padding-left: 0.5rem; }
  h2 { font-size: 1.2rem; }

  .hero-section::after { display: none; }

  .guide-section,
  .about-section,
  .changelog-section,
  .faq-section,
  .privacy-section {
    flex-direction: column;
    padding: 1.25rem 0.75rem;
  }

  .guide-sidebar,
  .about-sidebar,
  .changelog-sidebar,
  .faq-sidebar,
  .privacy-sidebar {
    width: 100%;
    position: static;
  }

  .content-section { padding: 1.5rem 0.75rem 2rem; }

  .site-footer { flex-direction: column; }
  .site-footer > div {
    border-right: none;
    border-bottom: 1px solid rgba(245,166,35,0.2);
    padding: 1.25rem 0.75rem;
  }
}

@media (max-width: 400px) {
  .cta { font-size: 0.65rem; padding: 0.5rem 0.5rem; }
  .brand { font-size: 0.75rem; }
}

/* ================================================
   PRINT
   ================================================ */
@media print {
  .site-header, .site-footer, .guide-sidebar, .about-sidebar,
  .changelog-sidebar, .faq-sidebar, .privacy-sidebar { display: none; }
  body { font-size: 12pt; }
  a { text-decoration: underline; }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}