/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg-primary: #0a0f0d;
  --bg-surface: #121916;
  --bg-surface2: #18221d;
  --border-subtle: #26352d;
  --accent-main: #18a873;
  --accent-light: #64ddb0;
  --accent-dim: #14835b;
  --text-primary: #f4fbf7;
  --text-muted: #8ea69a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --max-w: 1140px;
  --space-side: 1.25rem;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --card-bg: rgba(255,255,255,0.018);
  --card-border: rgba(255,255,255,0.06);
  --badge-bg: rgba(24,168,115,0.10);
  --badge-border: rgba(100,221,176,0.20);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--text-muted);
  background: var(--bg-primary);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-light); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-main); }
a:focus-visible { outline: 2px solid var(--accent-main); outline-offset: 2px; border-radius: 3px; }
ul, ol { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.22;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.3rem, 3vw, 1.85rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin-bottom: var(--space-xs); }
h4 { font-size: 1.05rem; margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); }
strong { color: var(--text-primary); font-weight: 600; }

/* ===== LAYOUT ===== */
.wrap-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-side);
}
.sec-base { background: var(--bg-primary); padding: var(--space-2xl) 0; }
.sec-alt { background: var(--bg-surface); padding: var(--space-2xl) 0; }

/* ===== HEADER / NAVIGATION ===== */
.gs-masthead {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}
.gs-masthead .wrap-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: var(--space-sm);
}
.gs-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}
.gs-brand-link:hover { color: var(--accent-light); }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; }
.gs-primary-nav ul {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.gs-primary-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.gs-primary-nav a:hover,
.gs-primary-nav a[aria-current="page"] {
  color: var(--accent-light);
}
.nav-trigger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.trigger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== BREADCRUMBS ===== */
.pathway-nav {
  padding: var(--space-sm) 0 0;
}
.pathway-nav ol {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}
.pathway-nav li { display: flex; align-items: center; gap: 0.4rem; }
.pathway-nav li + li::before { content: "›"; color: var(--text-muted); }
.pathway-nav a { color: var(--text-muted); }
.pathway-nav a:hover { color: var(--accent-light); }
.pathway-nav [aria-current="page"] { color: var(--accent-light); font-weight: 500; }

/* ===== HERO / SPOTLIGHT ===== */
.spotlight-zone {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}
.age-marker {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 20px;
  margin-bottom: var(--space-sm);
}
.publish-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.publish-meta a { color: var(--accent-light); }
.lead-text {
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: var(--space-lg);
}
.hero-cta { display: inline-block; }

/* ===== BUTTONS ===== */
.go-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-dim));
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  text-align: center;
}
.go-btn:hover {
  color: #fff;
  box-shadow: 0 10px 32px rgba(24,168,115,0.18);
  transform: translateY(-1px);
}
.go-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.text-link {
  color: var(--accent-light);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.text-link:hover { border-color: var(--accent-light); }

/* ===== LISTING SHOWCASE ===== */
.listing-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.listing-entry {
  display: grid;
  grid-template-columns: 48px 160px 1fr 148px;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
  position: relative;
}
.listing-entry:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.rank-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 50%;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.brand-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.018);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  min-height: 56px;
}
.brand-wrap img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}
.deal-info { min-width: 0; }
.deal-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.deal-highlight {
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}
.deal-summary {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

/* ===== REVIEW BLOCKS ===== */
.review-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.trait-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}
.trait-pill {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 20px;
}
.review-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.brand-wrap-review { min-width: 140px; }
.review-block h3 { margin-bottom: 0; }
.review-block > p { margin-top: 0; }
.review-cta { margin-top: var(--space-md); }

/* ===== TABLES ===== */
.table-frame { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--space-md) 0; }
.eval-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.eval-table th, .data-table th {
  background: var(--bg-surface2);
  color: var(--accent-light);
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 2px solid var(--border-subtle);
}
.eval-table td, .data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.eval-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) {
  background: var(--bg-surface);
}
.eval-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd) {
  background: var(--bg-surface2);
}

/* ===== GAME GRID ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.game-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.game-tile h3 { color: var(--accent-light); font-size: 1.05rem; }
.game-tile p { font-size: 0.88rem; margin-bottom: 0; }

/* ===== STEPS ===== */
.process-steps {
  counter-reset: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.step-unit {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-dim));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.step-body h3 { color: var(--text-primary); margin-bottom: 0.25rem; }
.step-body p { font-size: 0.9rem; margin-bottom: 0; }

/* ===== COIN GRID ===== */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.coin-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
}
.coin-code {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-light);
}
.coin-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== FAQ ACCORDION ===== */
.qna-unit {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: border-color 0.2s ease;
}
.qna-unit[open] { border-color: var(--border-subtle); }
.qna-unit summary {
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  user-select: none;
}
.qna-unit summary::-webkit-details-marker { display: none; }
.qna-unit summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent-main);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}
.qna-unit[open] summary::after { content: "−"; }
.qna-body {
  padding: 0 var(--space-md) var(--space-md);
  font-size: 0.9rem;
}
.qna-body p:last-child { margin-bottom: 0; }

/* ===== INNER PAGES ===== */
.inner-hero { padding-bottom: var(--space-lg); }
.inner-content h2 { margin-top: var(--space-xl); }
.inner-content h2:first-child { margin-top: 0; }
.inner-content h3 { margin-top: var(--space-lg); color: var(--accent-light); }
.inner-content ul, .inner-content ol { margin-bottom: var(--space-sm); padding-left: var(--space-lg); }
.inner-content li { margin-bottom: 0.4rem; list-style: disc; }
.inner-content ol li { list-style: decimal; }
.resource-list { padding-left: 0; }
.resource-list li { list-style: none; margin-bottom: var(--space-md); }

/* ===== AUTHOR PROFILE ===== */
.author-profile {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.author-role {
  color: var(--accent-light);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ===== FOOTER ===== */
.gs-base {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0 var(--space-lg);
}
.base-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.base-heading {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: var(--space-sm);
}
.base-col ul { display: flex; flex-direction: column; gap: 0.4rem; }
.base-col a { color: var(--text-muted); font-size: 0.85rem; }
.base-col a:hover { color: var(--accent-light); }
.base-blurb { font-size: 0.84rem; line-height: 1.6; }
.base-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8rem;
}
.base-disclaimer {
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 0.4rem;
  font-size: 0.76rem;
}

/* ===== SCROLL TO TOP ===== */
.rise-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-dim));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.25s ease;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.rise-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.rise-btn:hover {
  box-shadow: 0 6px 24px rgba(24,168,115,0.25);
}
.rise-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .listing-entry {
    grid-template-columns: 48px 120px 1fr 130px;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }
  .base-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  :root { --space-side: 1rem; }
  .sec-base, .sec-alt { padding: var(--space-xl) 0; }

  .nav-trigger { display: flex; }
  .gs-primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .gs-primary-nav.nav-open { max-height: 320px; }
  .gs-primary-nav ul {
    flex-direction: column;
    padding: var(--space-sm) var(--space-side);
    gap: 0;
  }
  .gs-primary-nav a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
  }
  .gs-primary-nav li:last-child a { border-bottom: none; }
  .gs-masthead .wrap-content { position: relative; }

  .listing-entry {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-sm);
  }
  .rank-marker {
    position: absolute;
    top: 12px;
    left: 12px;
  }
  .listing-entry .go-btn { width: 100%; }
  .brand-wrap { justify-content: center; }

  .review-top {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  .review-cta { width: 100%; }

  .base-grid { grid-template-columns: 1fr; gap: var(--space-md); }

  .game-grid { grid-template-columns: 1fr; }

  .coin-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

  .author-profile {
    flex-direction: column;
    text-align: center;
  }
  .author-avatar { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .lead-text { font-size: 0.98rem; }
  .rise-btn { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
}