/* =========================================================
   GAMEDECK — MAIN STYLESHEET
   Color variables are injected in <head> by functions.php
   (gamedeck_css_variables) so every color below is editable
   from the Customizer without touching this file.
   ========================================================= */

/* ---------- Fallback color system (overridden by inline vars) ---------- */
:root {
  --gd-primary: #024A49;
  --gd-secondary: #E1AF25;
  --gd-accent: #F59E0B;
  --gd-bg: #0B0B14;
  --gd-surface: #15151F;
  --gd-text: #F5F5F7;
  --gd-muted: #9A9AB0;
  --gd-border: #26263A;
  --gd-button: #024A49;
  --gd-glow: #024A49;
  --gd-login-button: #E1AF25;
  --gd-login-text: #0B0B14;
  --gd-register-button: #024A49;
  --gd-register-text: #FFFFFF;

  --gd-radius-sm: 8px;
  --gd-radius-md: 14px;
  --gd-radius-lg: 22px;
  --gd-container: 1180px;
  --gd-transition: 220ms cubic-bezier(.2,.8,.2,1);

  /* Featured image "box" size — change these two values any time
     (or override in a child theme) to resize the hero image box
     everywhere it's used. Currently set to 250x250 as requested. */
  --gd-hero-img-size: 250px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--gd-bg);
  color: var(--gd-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gd-secondary); text-decoration: none; transition: color var(--gd-transition); }
a:hover { color: var(--gd-primary); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gd-secondary);
  outline-offset: 2px;
  border-radius: 2px;
}
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
}
.gd-skip-link:focus {
  position: fixed; top: 10px; left: 10px; z-index: 9999;
  background: var(--gd-surface); color: var(--gd-text);
  padding: 10px 16px; border-radius: var(--gd-radius-sm);
  width: auto; height: auto; clip: auto;
}

.gd-container {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--gd-text);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; }
h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gd-muted); }
h1, h2, h3, h4, h5, h6, p, .gd-dlbox-value, .gd-post-title { overflow-wrap: break-word; word-break: break-word; }

/* .gd-section-title's actual banner design (background, color,
   padding, radius) lives further down in the ARTICLE CONTENT HEADING
   SYSTEM block, so every H2 across the whole site — homepage
   sections, article content, and the Download/Register template
   pages — shares one single definition instead of two competing
   ones. */

p { color: var(--gd-muted); margin: 0 0 1em; }

/* =========================================================
   BUTTONS — premium, animated, accessible
   ========================================================= */
.gd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--gd-radius-md);
  font-weight: 700;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--gd-transition), box-shadow var(--gd-transition), background var(--gd-transition), color var(--gd-transition), border-color var(--gd-transition);
  will-change: transform;
  position: relative;
}
.gd-btn:hover { transform: translateY(-3px) scale(1.02); }
.gd-btn:active { transform: translateY(-1px) scale(.99); }
.gd-btn:focus-visible {
  outline: 2px solid var(--gd-secondary);
  outline-offset: 3px;
}

.gd-btn-primary {
  background: linear-gradient(135deg, var(--gd-button), var(--gd-primary));
  color: #fff;
  box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--gd-glow) 70%, transparent);
}
.gd-btn-primary:hover {
  color: #fff;
  box-shadow: 0 12px 32px -8px color-mix(in srgb, var(--gd-glow) 85%, transparent);
}

.gd-btn-ghost {
  background: transparent;
  color: var(--gd-text);
  border-color: var(--gd-border);
}
.gd-btn-ghost:hover {
  color: var(--gd-text);
  border-color: var(--gd-secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gd-secondary) 15%, transparent);
}

.gd-btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.gd-btn-xl { padding: 18px 40px; font-size: 1.1rem; width: 100%; }
.gd-btn-sm { padding: 9px 16px; font-size: .82rem; border-radius: var(--gd-radius-sm); }

.gd-btn-icon { font-size: 1.1em; }

/* Login button — outlined "ghost pill" by default so it visually pairs
   with the solid Register button next to it (see reference button
   design). Independent color from Download/Register (set from the
   Customizer's Color System section) and fully editable: the border/
   background pattern below can be restyled to a solid fill any time
   from Appearance → Customize → Design & Layout Customization →
   Buttons — Login Button (border width/color, radius, shadow, hover
   effect are all controls there). */
.gd-btn-login {
  background: transparent;
  color: var(--gd-login-button);
  border-color: var(--gd-login-button);
  box-shadow: none;
}
.gd-btn-login:hover {
  background: var(--gd-login-button);
  color: var(--gd-login-text);
  box-shadow: 0 12px 32px -8px color-mix(in srgb, var(--gd-login-button) 55%, transparent);
}

/* Register button — solid pill, its own color pair independent from
   Download/Login (set from the Customizer's Color System section). */
.gd-btn-register {
  background: var(--gd-register-button);
  color: var(--gd-register-text);
  box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--gd-register-button) 55%, transparent);
}
.gd-btn-register:hover {
  color: var(--gd-register-text);
  box-shadow: 0 12px 32px -8px color-mix(in srgb, var(--gd-register-button) 70%, transparent);
}

/* Login + Register shown together as a compact pair (header corner,
   mobile hero row, download card, and the [gd_login_register]
   shortcode inside article content). */
.gd-btn-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   HEADER
   ========================================================= */
.gd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Solid fallback FIRST for browsers without color-mix() support
     (some older/budget mobile browsers) — without it, the whole
     declaration below is invalid and the header loses its background
     entirely. Modern browsers apply the nicer translucent version
     that follows, since it comes later in the cascade. */
  background: var(--gd-bg);
  background: color-mix(in srgb, var(--gd-bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--gd-border);
}
/* Keep the sticky header below the WP admin bar instead of hiding under it */
.admin-bar .gd-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .gd-header { top: 46px; }
}
.gd-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.gd-logo { flex-shrink: 0; }
.gd-logo img { max-height: 44px; width: auto; }
.gd-logo-text {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gd-text);
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gd-nav { flex: 1; }
.gd-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.gd-menu a {
  color: var(--gd-muted);
  font-weight: 600;
  font-size: .95rem;
  position: relative;
  padding: 6px 0;
}
.gd-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0%;
  background: var(--gd-secondary);
  transition: width var(--gd-transition);
}
.gd-menu a:hover { color: var(--gd-text); }
.gd-menu a:hover::after { width: 100%; }

.gd-header-cta { flex-shrink: 0; }

/* Right-hand corner group: Download Now + Login Now, plus the mobile
   hamburger. Kept together so it stays visible and lines up cleanly
   on every screen size — this is what makes both buttons show up in
   the mobile corner next to the logo, not just on desktop. */
.gd-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.gd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gd-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-sm);
  cursor: pointer;
  transition: border-color var(--gd-transition), background var(--gd-transition), transform var(--gd-transition);
}
.gd-menu-toggle:hover { border-color: var(--gd-secondary); background: color-mix(in srgb, var(--gd-secondary) 10%, transparent); }
.gd-menu-toggle:active { transform: scale(.94); }
.gd-menu-toggle:focus-visible { outline: 2px solid var(--gd-secondary); outline-offset: 2px; }
.gd-menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--gd-text);
  transition: transform var(--gd-transition), opacity var(--gd-transition);
}
.gd-menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gd-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.gd-menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.gd-hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.gd-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(600px 400px at 15% 20%, color-mix(in srgb, var(--gd-primary) 28%, transparent), transparent 70%),
    radial-gradient(500px 380px at 85% 10%, color-mix(in srgb, var(--gd-secondary) 22%, transparent), transparent 70%),
    var(--gd-bg);
}
.gd-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.gd-badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--gd-surface);
  background: color-mix(in srgb, var(--gd-primary) 18%, transparent);
  border: 1px solid var(--gd-border);
  border: 1px solid color-mix(in srgb, var(--gd-primary) 45%, transparent);
  color: var(--gd-secondary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.gd-hero-title { margin-bottom: 18px; }
.gd-hero-subtitle {
  font-size: 1.1rem;
  max-width: 52ch;
  margin-bottom: 26px;
}
.gd-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.gd-meta-pill {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--gd-text);
}
.gd-hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.gd-hero-media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: var(--gd-hero-img-size);
  margin: 0 auto;
}
.gd-hero-media-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gd-glow) 40%, transparent), transparent 70%);
  filter: blur(30px);
  z-index: 0;
}

/* Featured image box — fixed 250x250 (see --gd-hero-img-size above). */
.gd-image-frame {
  position: relative;
  z-index: 1;
  width: var(--gd-hero-img-size);
  height: var(--gd-hero-img-size);
  border-radius: var(--gd-radius-lg);
  border: 1px solid var(--gd-border);
  background: var(--gd-surface);
  background: linear-gradient(160deg, color-mix(in srgb, var(--gd-surface) 92%, white 8%), var(--gd-surface));
  padding: 10px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
}
.gd-image-frame img {
  border-radius: calc(var(--gd-radius-lg) - 8px);
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

/* Optional separate mobile image (Hero Section → Mobile Featured
   Image in the Customizer). When it's set, the desktop image hides
   below 720px and this one takes over — and vice versa above 720px.
   If no mobile image is uploaded, neither class is printed and the
   single image just shows on every screen size. */
.gd-image-frame-mobile { display: none; }
@media (max-width: 720px) {
  .gd-image-frame-desktop { display: none; }
  .gd-image-frame-mobile { display: block; }
}

/* Download Now (+ Login Now on mobile only) sit directly under the
   featured image — this is the button the header's Download link
   scrolls down to. */
.gd-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.gd-hero-cta-row .gd-btn { flex: 1 1 auto; width: auto; }
.gd-hero-login-mobile,
.gd-hero-register-mobile { display: none; }

/* Rating / Downloads / Votes — directly under the featured image. */
.gd-hero-stats {
  justify-content: center;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.gd-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1px dashed var(--gd-border);
  border-radius: var(--gd-radius-md);
  background: var(--gd-surface);
  color: var(--gd-muted);
  font-size: .85rem;
  text-align: center;
  padding: 20px;
}

/* =========================================================
   DOWNLOAD INFORMATION BOX  (inc/download-box.php)

   The ONE download box in this theme. The two older ones (the compact
   "Download Card" with its pill row, and the separate "Download Info"
   grid) were deleted from this stylesheet along with their markup, so
   nothing here overlaps or competes with them any more.

   Every color below is written as a var(--gd-dlbox-*) with a theme-
   palette fallback, e.g. var(--gd-dlbox-icon, var(--gd-secondary)).
   That means: with nothing configured the box automatically follows the
   site's own colors, and the moment a color IS chosen in the Customizer
   the box element carries it as an inline custom property, which wins
   without a single !important.
   ========================================================= */

/* Lands the sticky header's height below the top when jumped to via the
   header's "Download Now" link or the bottom-right "Jump to Download"
   shortcut, instead of tucking the box's top edge under the header. */
#gd-download { scroll-margin-top: 96px; }

.gd-dlbox-section { padding: 0 0 72px; margin-top: -30px; position: relative; z-index: 2; }

.gd-dlbox {
  /* Solid fallback first, then the nicer gradient — a browser without
     color-mix() support keeps a real background instead of dropping the
     declaration and rendering the cards on bare page background. */
  background: var(--gd-dlbox-bg, var(--gd-surface));
  background: linear-gradient(160deg,
      color-mix(in srgb, var(--gd-dlbox-bg, var(--gd-surface)) 96%, white 4%),
      var(--gd-dlbox-bg, var(--gd-surface)));
  border: 1px solid var(--gd-dlbox-card-border, var(--gd-border));
  border-radius: var(--gd-radius-lg);
  padding: 26px;
  box-shadow: 0 20px 50px -28px rgba(0,0,0,.55);
}

/* The card row. `minmax(0, 1fr)` (not plain `1fr`) is deliberate: a
   grid track's default minimum is `auto`, so one long unbroken value
   (a long developer name, a long app name) can force the track wider
   than its share and push the whole row sideways — the classic cause
   of a box that looks perfect on desktop and overflows on a phone.
   With a 0 minimum every column stays inside the grid instead. */
.gd-dlbox-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.gd-dlbox-cols-3 .gd-dlbox-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gd-dlbox-cols-4 .gd-dlbox-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gd-dlbox-cols-5 .gd-dlbox-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gd-dlbox-cols-6 .gd-dlbox-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.gd-dlbox-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  text-align: center;
  padding: 20px 12px 18px;
  background: var(--gd-dlbox-card-bg, color-mix(in srgb, var(--gd-bg) 55%, transparent));
  border: 1px solid var(--gd-dlbox-card-border, var(--gd-border));
  border-radius: var(--gd-radius-md);
  transition: transform var(--gd-transition), border-color var(--gd-transition), box-shadow var(--gd-transition);
}
.gd-dlbox-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--gd-dlbox-icon, var(--gd-secondary)) 55%, var(--gd-border));
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--gd-glow) 70%, transparent);
}

.gd-dlbox-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  margin-bottom: 2px;
  color: var(--gd-dlbox-icon, var(--gd-secondary));
}
.gd-dlbox-svg { width: 32px; height: 32px; display: block; }

.gd-dlbox-label {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--gd-dlbox-label, var(--gd-text));
  overflow-wrap: anywhere;
}
.gd-dlbox-value {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
  color: var(--gd-dlbox-value, var(--gd-muted));
  overflow-wrap: anywhere;
}

.gd-dlbox-cta {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
/* .gd-btn-xl is width:100% (it was written for the narrow hero column),
   which makes the button span the whole box on a wide screen and look
   like a banner rather than a button. Full width is right on a phone,
   so it is restored in the small-screen block further down. */
.gd-dlbox-btn { min-height: 52px; width: auto; min-width: 280px; }
.gd-dlbox-btn .gd-btn-icon { display: inline-flex; align-items: center; }
.gd-dlbox-btn .gd-dlbox-svg { width: 20px; height: 20px; }

/* Same box, dropped inside article content with [gd_download_box] */
.gd-dlbox-inline { margin: 28px 0; }
.gd-dlbox-inline-title { margin-bottom: 14px; }

/* --- Download box: tablets and phones ---
   3 per row on tablets, 2 per row on phones, which is what the
   reference layout collapses to and keeps every label readable
   instead of shrinking six cards into one line. */
@media (max-width: 980px) {
  .gd-dlbox-grid,
  .gd-dlbox-cols-3 .gd-dlbox-grid,
  .gd-dlbox-cols-4 .gd-dlbox-grid,
  .gd-dlbox-cols-5 .gd-dlbox-grid,
  .gd-dlbox-cols-6 .gd-dlbox-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gd-dlbox-grid,
  .gd-dlbox-cols-3 .gd-dlbox-grid,
  .gd-dlbox-cols-4 .gd-dlbox-grid,
  .gd-dlbox-cols-5 .gd-dlbox-grid,
  .gd-dlbox-cols-6 .gd-dlbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gd-dlbox { padding: 18px; }
  .gd-dlbox-section { padding-bottom: 56px; margin-top: -20px; }
  .gd-dlbox-card { padding: 16px 10px 14px; }
  .gd-dlbox-icon { width: 38px; height: 38px; }
  .gd-dlbox-svg { width: 27px; height: 27px; }
  .gd-dlbox-label { font-size: .95rem; }
  .gd-dlbox-value { font-size: .87rem; }
  .gd-dlbox-btn { width: 100%; min-width: 0; }
}

/* =========================================================
   FEATURES
   ========================================================= */
.gd-features-section { padding: 80px 0; }
.gd-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gd-feature-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 28px;
  transition: transform var(--gd-transition), border-color var(--gd-transition), box-shadow var(--gd-transition);
}
.gd-feature-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--gd-secondary) 50%, var(--gd-border));
  box-shadow: 0 16px 40px -20px color-mix(in srgb, var(--gd-glow) 60%, transparent);
}
.gd-feature-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--gd-radius-sm);
  background: var(--gd-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gd-primary) 25%, transparent), color-mix(in srgb, var(--gd-secondary) 20%, transparent));
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.gd-feature-title { margin-bottom: 8px; }
.gd-feature-text { margin: 0; font-size: .94rem; }

/* =========================================================
   SCREENSHOTS
   ========================================================= */
.gd-screenshots-section { padding: 80px 0; background: var(--gd-surface); }
.gd-screenshots-scroller {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 6px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gd-screenshots-scroller::-webkit-scrollbar { height: 8px; }
.gd-screenshots-scroller::-webkit-scrollbar-thumb { background: var(--gd-border); border-radius: 8px; }

.gd-screenshot-item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  border-radius: var(--gd-radius-md);
  overflow: hidden;
  border: 1px solid var(--gd-border);
  background: var(--gd-bg);
  transition: transform var(--gd-transition);
}
.gd-screenshot-item:hover { transform: translateY(-4px) scale(1.02); }
.gd-screenshot-item img { aspect-ratio: 9/16; object-fit: cover; width: 100%; }

/* =========================================================
   HOMEPAGE PROS & CONS SECTION
   (Appearance → Customize → Pros & Cons Section (Homepage))
   Reuses the same .gd-pros-cons/.gd-pros-card/.gd-cons-card CSS as
   the [gd_pros_cons] article shortcode, so both look identical.
   ========================================================= */
.gd-pros-cons-section { padding: 80px 0; }
.gd-pros-cons-section .gd-pros-cons { margin: 0; }

/* =========================================================
   HOMEPAGE FAQ SECTION
   (Appearance → Customize → FAQ Section (Homepage))
   Reuses the same .gd-faq-item accordion CSS/JS as every other FAQ
   list in the theme (animated plus/minus icon included).
   ========================================================= */
.gd-faq-section { padding: 80px 0; background: var(--gd-surface); }
.gd-faq-section .gd-faq-list { max-width: 820px; margin: 0 auto; }

/* =========================================================
   INSTALLATION STEPS
   ========================================================= */
.gd-install-section { padding: 80px 0; }
.gd-steps {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}
.gd-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 22px 24px;
  transition: border-color var(--gd-transition), transform var(--gd-transition);
}
.gd-step:hover { border-color: color-mix(in srgb, var(--gd-primary) 45%, var(--gd-border)); transform: translateX(4px); }
.gd-step-number {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.gd-step-title { margin-bottom: 4px; }
.gd-step-text { margin: 0; font-size: .94rem; }

/* =========================================================
   IMPORTANT INFORMATION BOX
   ========================================================= */
/* =========================================================
   ARTICLE SECTION (content pulled from a chosen WP Page)
   ========================================================= */
.gd-article-section { padding: 80px 0; }
.gd-article-content {
  max-width: 820px;
  margin: 0 auto;
}
.gd-article-content h2, .gd-article-content h3, .gd-article-content h4 {
  margin-top: 1.4em;
  margin-bottom: .5em;
}
.gd-article-content p { margin-bottom: 1.1em; }
.gd-article-content a, .gd-entry-content a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.gd-article-content img { border-radius: var(--gd-radius-md); height: auto; max-width: 100%; }

/* ---------- Real bullet/number markers for content lists ----------

   Two things here are deliberate, and both are mobile fixes at the
   root rather than patches:

   1. The indent is PADDING, never margin. A list marker sits outside
      its <li> content box, so with `margin-left` the marker is drawn in
      the margin — outside the list's own box — where any ancestor that
      clips (body has overflow-x:hidden, and cards/sections use
      overflow:hidden for their rounded corners) can cut it off. On a
      narrow phone that margin is exactly where the clip edge lands, so
      bullets and numbers disappear while the text stays. Padding keeps
      every marker inside the element, so it can never be clipped.

   2. The theme's OWN component lists are excluded by name. The rules
      below are `.gd-article-content ul` (specificity 0-1-1), which is
      stronger than a plain component class like `.gd-toc-list`
      (0-1-0) — so without these :not() exclusions, every list the
      theme draws itself inside article content (the Table of Contents,
      Pros & Cons, menus) silently picked up article bullets on top of
      its own markers. That is what produced the double bullets and the
      misaligned Table of Contents on phones. */
.gd-article-content ul:not([class]), .gd-article-content ol:not([class]),
.gd-entry-content ul:not([class]), .gd-entry-content ol:not([class]),
.gd-article-content ul.wp-block-list, .gd-entry-content ul.wp-block-list,
.gd-article-content ol.wp-block-list, .gd-entry-content ol.wp-block-list {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
  list-style-position: outside;
}
.gd-article-content ul:not([class]), .gd-entry-content ul:not([class]),
.gd-article-content ul.wp-block-list, .gd-entry-content ul.wp-block-list { list-style-type: disc; }
.gd-article-content ol:not([class]), .gd-entry-content ol:not([class]),
.gd-article-content ol.wp-block-list, .gd-entry-content ol.wp-block-list { list-style-type: decimal; }
.gd-article-content ul:not([class]) ul, .gd-article-content ol:not([class]) ul,
.gd-entry-content ul:not([class]) ul, .gd-entry-content ol:not([class]) ul { list-style-type: circle; margin-bottom: 0; }
.gd-article-content ul:not([class]) li, .gd-article-content ol:not([class]) li,
.gd-entry-content ul:not([class]) li, .gd-entry-content ol:not([class]) li,
.gd-article-content .wp-block-list li, .gd-entry-content .wp-block-list li {
  display: list-item;
  margin-bottom: .5em;
}
.gd-article-content li::marker, .gd-entry-content li::marker { color: var(--gd-secondary); font-weight: 700; }

/* Belt and braces for the theme's own lists rendered inside article
   content: they draw their own markers (or none at all), so make sure
   nothing above can add a second one. */
.gd-article-content .gd-toc-list, .gd-article-content .gd-toc-sublist,
.gd-article-content .gd-pros-cons-list, .gd-article-content .gd-menu,
.gd-entry-content .gd-toc-list, .gd-entry-content .gd-toc-sublist,
.gd-entry-content .gd-pros-cons-list, .gd-entry-content .gd-menu {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/* Blockquote — used for "quote" style call-outs (e.g. a Responsible
   Gaming note or a personal-experience/review excerpt). A large
   decorative quotation mark makes it read as a distinct voice from
   the surrounding body copy rather than just an indented paragraph. */
.gd-article-content blockquote, .gd-entry-content blockquote {
  position: relative;
  margin: 1.6em 0;
  padding: 22px 26px 22px 56px;
  border-left: 3px solid var(--gd-secondary);
  background: var(--gd-surface);
  border-radius: var(--gd-radius-md);
  font-style: italic;
  color: var(--gd-text);
}
.gd-article-content blockquote::before, .gd-entry-content blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 4px;
  font-size: 2.6rem;
  font-style: normal;
  line-height: 1;
  color: var(--gd-secondary);
  opacity: .8;
}
.gd-article-content blockquote p:last-child, .gd-entry-content blockquote p:last-child { margin-bottom: 0; }
.gd-article-content blockquote cite, .gd-entry-content blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 700;
  font-size: .85rem;
  color: var(--gd-muted);
}

/* Tables — a plain WordPress Table block (or a hand-typed <table>)
   can be wider than the article column on a phone; scroll it
   horizontally instead of ever letting it push the page wider than
   the viewport. */
.gd-article-content table, .gd-entry-content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gd-article-content .wp-block-table, .gd-entry-content .wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gd-article-content th, .gd-article-content td,
.gd-entry-content th, .gd-entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--gd-border);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.gd-article-content th, .gd-entry-content th {
  background: var(--gd-surface);
  color: var(--gd-text);
  font-weight: 700;
}

.gd-notice-section { padding: 0 0 80px; }
.gd-notice-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  /* Solid fallback first — this is the Disclaimer / Important
     Information box, real content, so it must never lose its
     background entirely on unsupported browsers. */
  background: var(--gd-surface);
  background: color-mix(in srgb, var(--gd-accent) 10%, var(--gd-surface));
  border: 1px solid var(--gd-border);
  border: 1px solid color-mix(in srgb, var(--gd-accent) 40%, var(--gd-border));
  border-radius: var(--gd-radius-md);
  padding: 26px;
}
.gd-notice-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gd-accent);
  background: color-mix(in srgb, var(--gd-accent) 25%, transparent);
  color: var(--gd-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.gd-notice-title { margin-bottom: 6px; }
.gd-notice-text p:last-child { margin-bottom: 0; }

/* =========================================================
   LATEST POSTS
   ========================================================= */
.gd-posts-section { padding: 80px 0; }
.gd-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.gd-posts-grid-wide { grid-template-columns: repeat(3, 1fr); padding-top: 60px; }
.gd-post-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  overflow: hidden;
  transition: transform var(--gd-transition), box-shadow var(--gd-transition);
}
.gd-post-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -22px rgba(0,0,0,.6); }
.gd-post-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--gd-bg); }
.gd-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gd-post-body { padding: 20px; }
.gd-post-title { font-size: 1.1rem; margin-bottom: 8px; }
.gd-post-title a { color: var(--gd-text); }
.gd-post-title a:hover { color: var(--gd-secondary); }
.gd-post-excerpt { font-size: .9rem; margin-bottom: 12px; }
.gd-post-link { font-weight: 700; font-size: .88rem; }

.gd-pagination { margin-top: 40px; text-align: center; }
.gd-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; margin: 4px;
  padding: 0 10px;
  border-radius: var(--gd-radius-sm);
  border: 1px solid var(--gd-border);
  color: var(--gd-text);
  transition: border-color var(--gd-transition), background var(--gd-transition), color var(--gd-transition), transform var(--gd-transition);
}
a.gd-pagination-link.page-numbers:hover,
.gd-pagination a.page-numbers:hover {
  border-color: var(--gd-secondary);
  color: var(--gd-secondary);
  transform: translateY(-2px);
}
.gd-pagination a.page-numbers:active { transform: translateY(0); }
.gd-pagination a.page-numbers:focus-visible {
  outline: 2px solid var(--gd-secondary);
  outline-offset: 2px;
}
.gd-pagination .page-numbers.current { background: var(--gd-primary); border-color: var(--gd-primary); color: #fff; }

/* =========================================================
   GENERIC PAGE / SINGLE CONTENT
   ========================================================= */
.gd-content-page { padding: 60px 0 90px; }
.gd-single-content { max-width: 820px; }
.gd-page-header { margin-bottom: 24px; }
.gd-post-meta-line { color: var(--gd-muted); font-size: .88rem; display: flex; gap: 8px; }
.gd-page-thumb { border-radius: var(--gd-radius-md); overflow: hidden; margin-bottom: 28px; border: 1px solid var(--gd-border); }
.gd-entry-content { font-size: 1.02rem; }
.gd-entry-content h2, .gd-entry-content h3 { margin-top: 1.4em; }
.gd-entry-content img { border-radius: var(--gd-radius-md); }
.gd-post-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--gd-border); }

/* =========================================================
   404 PAGE
   ========================================================= */
.gd-404-inner {
  text-align: center;
  padding: 40px 0 20px;
}
.gd-404-code {
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gd-404-text { max-width: 46ch; margin: 0 auto 28px; }

/* =========================================================
   FOOTER
   ========================================================= */
.gd-footer {
  background: var(--gd-surface);
  border-top: 1px solid var(--gd-border);
  padding: 64px 0 28px;
  margin-top: 40px;
}
.gd-footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--gd-border);
}
.gd-footer-tagline { font-size: .9rem; margin-top: 10px; }
.footer-widget-title { font-size: .95rem; margin-bottom: 14px; }
.gd-footer-menu li { margin-bottom: 10px; }
.gd-footer-menu a { color: var(--gd-muted); font-size: .92rem; }
.gd-footer-menu a:hover { color: var(--gd-secondary); }
.gd-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: .85rem;
  color: var(--gd-muted);
}
.gd-footer-bottom p { margin: 0; }

.gd-back-to-top {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  /* Stacked above the floating action button (60px + 20px offset + gap) so the two never overlap */
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gd-button), var(--gd-primary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--gd-glow) 70%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--gd-transition), transform var(--gd-transition);
  z-index: 90;
}
.gd-back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.gd-back-to-top:hover { transform: translateY(-4px) scale(1.05); }
.gd-back-to-top:active { transform: translateY(-1px) scale(1.01); }
.gd-back-to-top:focus-visible { outline: 2px solid var(--gd-secondary); outline-offset: 3px; }

/* "Jump to Download" shortcut — stacked directly above Back to Top so
   the two never overlap (back-to-top: 46px tall, bottom 92px → top
   edge at 138px; this one starts at 150px, leaving a clean 12px gap).
   Always visible (not scroll-triggered) since it's a shortcut TO a
   section, not a "return" action. */
.gd-scroll-download-btn {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(150px, calc(env(safe-area-inset-bottom) + 150px));
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gd-primary);
  background: linear-gradient(135deg, var(--gd-button), var(--gd-primary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--gd-glow) 70%, transparent);
  transition: transform var(--gd-transition), box-shadow var(--gd-transition);
  z-index: 90;
  text-decoration: none;
}
.gd-scroll-download-btn:hover { transform: translateY(-4px) scale(1.05); }
.gd-scroll-download-btn:active { transform: translateY(-1px) scale(1.01); }
.gd-scroll-download-btn:focus-visible { outline: 2px solid var(--gd-secondary); outline-offset: 3px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Large screens / wide monitors — a little extra breathing room */
@media (min-width: 1440px) {
  .gd-container { max-width: 1280px; }
}

@media (max-width: 980px) {
  .gd-hero-inner { grid-template-columns: 1fr; }
  .gd-hero-media { order: -1; }
  .gd-features-grid { grid-template-columns: repeat(2, 1fr); }
  .gd-posts-grid, .gd-posts-grid-wide { grid-template-columns: repeat(2, 1fr); }
  .gd-footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .gd-header-inner { justify-content: space-between; gap: 12px; }
  .gd-nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--gd-bg);
    border-bottom: 1px solid var(--gd-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--gd-transition);
    flex: none;
  }
  .gd-nav.is-open { max-height: 400px; }
  .gd-menu { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 18px; }
  .gd-menu li { width: 100%; }
  .gd-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--gd-border); }

  /* Download Now + Login now STAY visible in the mobile corner (next
     to the logo) instead of being hidden — just sized down, and
     allowed to wrap onto a second row on very narrow screens, so they
     fit alongside the hamburger button without ever overflowing
     horizontally. */
  .gd-header-cta,
  .gd-header-login { padding: 8px 12px; font-size: .74rem; }
  .gd-header-right { gap: 8px; }
  .gd-header-actions { gap: 6px; flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; }
  .gd-menu-toggle { display: flex; }

  .gd-features-grid { grid-template-columns: 1fr; }
  .gd-posts-grid, .gd-posts-grid-wide { grid-template-columns: 1fr; }
  .gd-footer-top { grid-template-columns: 1fr; }
  .gd-hero { padding: 64px 0 56px; }
  .gd-hero-actions { flex-direction: column; align-items: stretch; }
  .gd-hero-actions .gd-btn { width: 100%; }

  /* Login + Register appear a second time here, next to the hero
     Download button, so all three are "visible with the featured
     image" at the top of the page on mobile (the header covers
     desktop). The row sits in a 250px-wide column, so buttons run
     smaller here than their .gd-btn-xl size on desktop and wrap onto
     their own line under Download instead of squeezing sideways. */
  .gd-hero-login-mobile,
  .gd-hero-register-mobile { display: inline-flex; flex: 1 1 auto; }
  .gd-hero-cta-row .gd-btn {
    padding: 12px 10px;
    font-size: .82rem;
  }
}

@media (max-width: 480px) {
  .gd-header-cta,
  .gd-header-login { padding: 7px 10px; font-size: .68rem; }
  .gd-header-right { gap: 6px; }

}

@media (max-width: 420px) {
  .gd-container { padding: 0 16px; }
  /* Custom button text can run long once real copy is added — wrap instead of overflowing */
  .gd-btn { white-space: normal; text-align: center; line-height: 1.3; }
}

/* =========================================================
   COMMENTS
   ========================================================= */
.gd-comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--gd-border); }
.gd-comments-title { margin-bottom: 20px; }
.gd-comment-list { margin-bottom: 28px; }
.gd-comment-list li { margin-bottom: 20px; }
.comment-body {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 18px 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-sm);
  color: var(--gd-text);
  font-family: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--gd-secondary);
}
.comment-form label { display: block; margin-bottom: 6px; font-size: .88rem; color: var(--gd-muted); }

/* =========================================================
   PAGE 2 & 3 — SHARED SECTION LAYOUT
   (How to Download & Install / How to Register & Login)
   ========================================================= */
.gd-page-wide { max-width: 860px; }
.gd-page-header-center { text-align: center; margin-bottom: 44px; }
.gd-page-header-center .gd-page-title::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  margin: 16px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gd-primary), var(--gd-secondary));
}

.gd-section-block { margin-bottom: 56px; }
.gd-section-block h2 { margin-bottom: 14px; }
.gd-rich-text p:last-child { margin-bottom: 0; }
.gd-empty-note {
  font-size: .9rem;
  font-style: italic;
  color: var(--gd-muted);
  border: 1px dashed var(--gd-border);
  border-radius: var(--gd-radius-sm);
  padding: 14px 16px;
}

.gd-req-block {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 22px 24px;
}
.gd-req-block h3 { margin-bottom: 8px; }

/* ---------- Final CTA block ---------- */
.gd-final-cta {
  text-align: center;
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-lg);
  padding: 44px 32px;
}
.gd-final-cta h2 { margin-bottom: 10px; }
.gd-final-cta .gd-rich-text { max-width: 56ch; margin: 0 auto 22px; }

/* =========================================================
   FAQ ACCORDION (vanilla JS toggle, CSS-driven animation)
   ========================================================= */
.gd-faq-list { display: grid; gap: 14px; }
.gd-faq-item {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  overflow: hidden;
  transition: border-color var(--gd-transition);
}
.gd-faq-item:hover { border-color: color-mix(in srgb, var(--gd-secondary) 40%, var(--gd-border)); }

.gd-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: none;
  color: var(--gd-secondary);
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  padding: 18px 22px;
  cursor: pointer;
}
.gd-faq-question:focus-visible {
  outline: 2px solid var(--gd-secondary);
  outline-offset: -2px;
}
/* Real animated plus → minus icon, drawn with two CSS bars so it
   never looks like an "x". The literal "+" character in the markup
   is visually hidden (font-size:0) but stays in the DOM for screen
   readers that ignore aria-hidden fallbacks and for no-CSS contexts. */
.gd-faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gd-surface);
  background: color-mix(in srgb, var(--gd-primary) 18%, transparent);
  color: transparent;
  font-size: 0;
  line-height: 0;
  transition: background var(--gd-transition);
}
.gd-faq-icon::before,
.gd-faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--gd-secondary);
  border-radius: 2px;
  transition: transform var(--gd-transition);
}
.gd-faq-icon::before {
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}
.gd-faq-icon::after {
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
}
.gd-faq-item.is-open .gd-faq-icon { background: var(--gd-surface); background: color-mix(in srgb, var(--gd-secondary) 22%, transparent); }
.gd-faq-item.is-open .gd-faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }

/* Same 0fr -> 1fr grid row as the Table of Contents, and for the same
   reason. The old version measured the answer's height in JavaScript
   and wrote it into max-height. That measurement is taken once, at the
   moment of the click, and it misses anything that changes afterwards:
   the bottom padding that only exists in the open state, a webfont that
   loads a moment later, and — most of all — a phone rotating or the
   browser's address bar collapsing, which re-wraps the text taller than
   the number already written into the element. The answer then stays
   clipped mid-sentence. Letting the grid row do it needs no measuring
   at all, so it is right at every width, on every rotation. */
.gd-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--gd-transition), padding var(--gd-transition);
  padding: 0 22px;
}
.gd-faq-answer > * { min-height: 0; overflow: hidden; }
.gd-faq-item.is-open .gd-faq-answer { grid-template-rows: 1fr; padding: 0 22px 20px; }
.gd-faq-answer p { margin: 0; font-size: .95rem; }

/* =========================================================
   ARTICLE CONTENT HEADING SYSTEM
   Consistent hierarchy for headings the author types inside article/
   page content: H2 = a bold banner bar for main sections (matches the
   "Understand the Platform" reference), H3 = a lighter accent-bar
   style for subsections, H4 = a small label style for minor
   subsections. All three stay fully overridable per level from
   Appearance → Customize → Design & Layout Customization → Heading
   Style — H2/H3/H4 (see inc/dynamic-css.php), which is loaded after
   this stylesheet and wins automatically.
   ========================================================= */
.gd-article-content h2, .gd-entry-content h2, .gd-content-page h2,
.gd-section-title {
  /* Solid fallback first — this is THE main H2 banner color used
     everywhere on the site. Without it, any browser that doesn't
     understand color-mix() would drop the whole background
     declaration and every H2 would render with no color at all. */
  background: var(--gd-primary);
  background: linear-gradient(120deg, var(--gd-primary), color-mix(in srgb, var(--gd-primary) 70%, black));
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--gd-radius-md);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  text-align: left;
  margin-bottom: 32px;
}
/* .gd-section-title now shares the exact H2 banner design used
   throughout the article, so every H2 on the site — homepage
   sections, the Download/Register template pages, and article
   content — looks and behaves identically. */
.gd-article-content h3, .gd-entry-content h3, .gd-content-page h3 {
  padding-left: 16px;
  border-left: 4px solid var(--gd-secondary);
  font-size: 1.2rem;
}
.gd-article-content h4, .gd-entry-content h4, .gd-content-page h4 {
  color: var(--gd-secondary);
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.gd-article-content h2, .gd-article-content h3, .gd-entry-content h2, .gd-entry-content h3,
.gd-content-page h2, .gd-content-page h3, .gd-section-title {
  scroll-margin-top: 108px;
}

/* =========================================================
   TABLE OF CONTENTS — [gd_toc]
   ========================================================= */
.gd-toc {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  margin: 0 0 32px;
  overflow: hidden;
}
.gd-toc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--gd-secondary);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
}
.gd-toc-header:focus-visible { outline: 2px solid var(--gd-secondary); outline-offset: -2px; }
.gd-toc-title { font-weight: 800; font-size: 1rem; }
.gd-toc-chevron {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--gd-secondary);
  border-bottom: 2px solid var(--gd-secondary);
  transform: rotate(45deg);
  transition: transform var(--gd-transition);
  margin-top: -4px;
}
.gd-toc.is-collapsed .gd-toc-chevron { transform: rotate(-135deg); margin-top: 4px; }
/* Open/close uses a 0fr -> 1fr grid row, NOT a max-height number.
   A fixed max-height has to be guessed, and the guess is always made
   for desktop: on a phone every entry wraps onto two or three lines, so
   the real list is far taller than the cap and the bottom of the
   Table of Contents is quietly cut off — the exact "works on desktop,
   broken on mobile" bug. A 1fr row means "however tall the content
   actually is", so it is correct at any width, with any number of
   headings, in any language, and it still animates. */
.gd-toc-body {
  display: grid;
  grid-template-rows: 1fr;
  padding: 0 20px 18px;
  transition: grid-template-rows var(--gd-transition), padding var(--gd-transition);
}
.gd-toc-body > * { min-height: 0; overflow: hidden; }
.gd-toc.is-collapsed .gd-toc-body { grid-template-rows: 0fr; padding: 0 20px; }

.gd-toc-list, .gd-toc-sublist { list-style: none; margin: 0; padding: 0; }

/* Custom markers, positioned from the TOP of the item rather than left
   as a normal list bullet. A real list marker aligns to the item's
   first line box only while that item is a single line; the moment a
   long heading wraps on a phone, an inline-block link drops the marker
   next to the wrong line. Drawing the dot ourselves at a fixed offset
   from the top keeps it beside the first line at every width. */
.gd-toc-list > li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 18px;
}
.gd-toc-list > li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--gd-secondary);
}
.gd-toc-list a {
  color: var(--gd-secondary);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.45;
  text-decoration: none;
  display: block;
  overflow-wrap: anywhere;
  transition: color var(--gd-transition), transform var(--gd-transition);
}
.gd-toc-list a:hover { color: var(--gd-text); transform: translateX(3px); }
.gd-toc-sublist { margin: 10px 0 0; padding-left: 0; }
.gd-toc-sublist li { margin-bottom: 8px; position: relative; padding-left: 16px; }
.gd-toc-sublist li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gd-muted);
}
.gd-toc-sublist a { font-weight: 500; font-size: .88rem; color: var(--gd-muted); display: block; }
.gd-toc-sublist a:hover { color: var(--gd-secondary); }

/* =========================================================
   PROS & CONS — [gd_pros_cons]
   ========================================================= */
.gd-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}
.gd-pros-card, .gd-cons-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 24px;
}
.gd-pros-card { border-top: 3px solid #2FB170; }
.gd-cons-card { border-top: 3px solid #E5484D; }
.gd-pros-cons-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin: 0 0 16px;
}
.gd-pros-cons-icon { font-size: 1.2em; }
.gd-pros-cons-list { display: grid; gap: 12px; }
.gd-pros-cons-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .95rem;
  color: var(--gd-text);
  overflow-wrap: anywhere;
  transition: transform var(--gd-transition);
}
.gd-pros-cons-list li:hover { transform: translateX(3px); }
.gd-pc-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  margin-top: 2px;
}
.gd-pc-icon-pro { background: var(--gd-surface); background: color-mix(in srgb, #2FB170 22%, transparent); color: #2FB170; }
.gd-pc-icon-con { background: var(--gd-surface); background: color-mix(in srgb, #E5484D 22%, transparent); color: #E5484D; }

/* =========================================================
   DEPOSIT & WITHDRAWAL — [gd_deposit_withdrawal]
   ========================================================= */
.gd-dw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}
.gd-dw-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius-md);
  padding: 24px;
}
.gd-dw-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin: 0 0 18px;
}
.gd-dw-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gd-surface);
  background: color-mix(in srgb, var(--gd-primary) 25%, transparent);
  color: var(--gd-secondary);
  font-size: 1rem;
}
.gd-dw-steps.gd-steps { max-width: none; margin: 0; gap: 14px; }
.gd-dw-steps .gd-step { padding: 16px 18px; }

/* =========================================================
   ARTICLE FEATURE CARDS — [gd_features]
   ========================================================= */
.gd-article-features-grid { margin: 32px 0; }

/* =========================================================
   ARTICLE SCREENSHOTS — [gd_screenshots]
   Reuses .gd-screenshots-scroller / .gd-screenshot-item as-is.
   ========================================================= */
.gd-article-screenshots { margin: 24px 0; padding: 0; }

/* =========================================================
   INLINE NOTICE / CALLOUT — [gd_notice]
   Reuses .gd-notice-box exactly; only adds article-flow spacing.
   ========================================================= */
.gd-article-content .gd-inline-notice, .gd-entry-content .gd-inline-notice { margin: 24px 0; }
.gd-inline-notice .gd-notice-text p:last-child { margin-bottom: 0; }

/* Extra spacing between stacked device groups in [gd_download_devices] */
.gd-download-devices h3 { margin-top: 1.6em; }
.gd-download-devices h3:first-child { margin-top: 0; }
.gd-feature-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--gd-secondary);
}
.gd-feature-link:hover { color: var(--gd-text); }

/* =========================================================
   INLINE LOGIN + REGISTER — [gd_login_register]
   ========================================================= */
.gd-article-content .gd-inline-buttons,
.gd-entry-content .gd-inline-buttons {
  margin: 22px 0;
}

@media (max-width: 720px) {
  .gd-pros-cons { grid-template-columns: 1fr; }
  .gd-dw-grid { grid-template-columns: 1fr; }
  .gd-article-content h2, .gd-entry-content h2, .gd-content-page h2, .gd-section-title { padding: 13px 18px; margin-bottom: 24px; }

  /* Section padding built for a wide desktop leaves phone-sized gaps of
     dead space between blocks — nearly a full screen of nothing between
     one section and the next. Tighter vertical rhythm here keeps the
     page continuous while scrolling with a thumb. */
  .gd-screenshots-section,
  .gd-article-section,
  .gd-posts-section { padding: 44px 0; }
  .gd-notice-section { padding: 0 0 40px; }
  .gd-article-content h3, .gd-entry-content h3 { font-size: 1.1rem; }
  .gd-steps { gap: 14px; }
  .gd-step { padding: 16px 18px; gap: 14px; }
}

@media (max-width: 480px) {
  .gd-pros-card, .gd-cons-card, .gd-dw-card { padding: 18px; }
  .gd-toc-header { padding: 14px 16px; }
  .gd-toc-body { padding: 0 16px 16px; }
  .gd-toc.is-collapsed .gd-toc-body { padding: 0 16px; }
}

@media (max-width: 420px) {
  .gd-hero-cta-row .gd-btn { flex: 1 1 100%; }
}

/* =========================================================
   FLOATING ACTION BUTTON — glass + glow + pulse
   ========================================================= */
.gd-floating-btn {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 95;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gd-surface);
  background: color-mix(in srgb, var(--gd-surface) 65%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid var(--gd-border);
  border: 1px solid color-mix(in srgb, var(--gd-glow) 45%, var(--gd-border));
  box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--gd-glow) 70%, transparent);
  overflow: visible;
  transition: transform var(--gd-transition), box-shadow var(--gd-transition);
}
.gd-floating-btn:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 36px -8px color-mix(in srgb, var(--gd-glow) 85%, transparent);
}
.gd-floating-btn:active { transform: translateY(-1px) scale(1.01); }
.gd-floating-btn:focus-visible {
  outline: 2px solid var(--gd-secondary);
  outline-offset: 3px;
}
.gd-floating-btn-img {
  width: 60%; height: 60%;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}
.gd-floating-btn-fallback {
  font-size: 1.6rem;
  position: relative;
  z-index: 2;
}
.gd-floating-btn-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--gd-glow) 60%, transparent);
  animation: gd-pulse 2.4s ease-out infinite;
  z-index: 1;
  pointer-events: none;
}
@keyframes gd-pulse {
  0%   { transform: scale(1);   opacity: .65; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

@media (max-width: 720px) {
  .gd-floating-btn {
    width: 52px; height: 52px;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .gd-back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 76px));
  }
  .gd-scroll-download-btn {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(134px, calc(env(safe-area-inset-bottom) + 134px));
    width: 42px; height: 42px;
    font-size: 1.05rem;
  }
}

/* =========================================================
   SCROLL-REVEAL (main.js) — class-based, not inline styles, so the
   normal :hover rules already defined above for these same cards
   (.gd-feature-card, .gd-step, .gd-post-card, .gd-dlbox, etc.)
   keep working once an element has scrolled into view. main.js only
   ever adds this class before the element is visible and REMOVES it
   completely (never leaves an "is-revealed" class behind), so a
   revealed card ends up with no reveal-related styling at all.
   ========================================================= */
.gd-reveal-pending {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .gd-floating-btn-ring { display: none; }
  .gd-reveal-pending { opacity: 1; transform: none; }
}
