:root {
  --bg: #0b0f1a;
  --bg-card: #151b2b;
  --bg-card-alt: #1c2438;
  --text: #e8ecf5;
  --text-muted: #9aa4b8;
  --primary: #5e35b1;
  --primary-hover: #512da8;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --border: #232d45;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.logo-accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--text);
}

.nav-highlight {
  background: var(--bg-card-alt);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-highlight:hover {
  background: var(--border);
  color: var(--text);
}

/* Main */
.site-main {
  flex: 1;
  padding: 48px 0 64px;
}

/* Hero Section */
.hero {
  text-align: left;
  margin-bottom: 48px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Live Telemetry / Status Board */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.telemetry-card .card-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.telemetry-card .card-value {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.val-green { color: var(--green); }
.val-amber { color: var(--amber); }
.val-cyan { color: var(--accent); }
.val-purple { color: var(--primary); }

.telemetry-card .card-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Section styling */
.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.content-section h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--text);
}

.content-section p {
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 75ch;
}

.content-section ul, .content-section ol {
  color: var(--text-muted);
  padding-left: 24px;
  margin-bottom: 20px;
  max-width: 75ch;
}

.content-section li {
  margin-bottom: 8px;
}

/* Reality Grid */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature-box h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-box p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Pipeline Architecture Block */
.pipeline-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pipeline-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  margin-bottom: 0;
}

/* Callout Box */
.callout-warning {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 20px;
  margin: 28px 0;
}

.callout-warning h3 {
  color: var(--amber);
  font-family: var(--font-heading);
  margin-top: 0;
  margin-bottom: 8px;
}

.callout-warning p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 0;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-card);
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  background: var(--bg-card-alt);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
}

td {
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ Accordion / List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.faq-item h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text);
  margin: 0 0 10px;
}

.faq-item p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg-card-alt);
}

/* Spec Calculator Card */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
}

.calc-header {
  margin-bottom: 24px;
}

.calc-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 6px;
}

.calc-sub {
  color: var(--text-muted);
  font-size: 15px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.calc-field select {
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.calc-field select:focus {
  border-color: var(--accent);
}

.calc-actions {
  display: flex;
  gap: 12px;
}

.calc-result {
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.result-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-green { background: var(--bg-card); color: var(--green); border: 1px solid var(--green); }
.badge-amber { background: var(--bg-card); color: var(--amber); border: 1px solid var(--amber); }
.badge-red { background: var(--bg-card); color: var(--red); border: 1px solid var(--red); }

.badge-fps {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.calc-result h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.calc-result p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.result-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: var(--bg);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.breakdown-item strong {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.breakdown-item span {
  font-size: 13px;
  color: var(--text);
}

.result-advice {
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 16px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 540px;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .site-header .header-inner {
    height: auto;
    padding: 14px 0;
    flex-direction: column;
    gap: 12px;
  }
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .telemetry-grid {
    grid-template-columns: 1fr;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .result-breakdown {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* Engine Comments & Discussions */
.comment-section {
  color: var(--text);
}
.comment-empty-hint {
  display: none;
}
[data-gf-empty] ~ .comment-empty-hint {
  display: block;
}
[data-gf-comments]:not([data-gf-empty]) ~ .comment-empty-hint {
  display: none;
}
[data-gf-replying] {
  border-color: var(--accent) !important;
}

/* Sticky Bottom Affiliate Floating Bar */
.gta-float-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(11, 15, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.75);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  padding: 18px 0;
}

.gta-float-bar.is-collapsed {
  transform: translateY(105%);
  opacity: 0;
  pointer-events: none;
}

.gta-float-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.gta-float-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.gta-float-video-wrap {
  width: 192px;
  height: 108px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: #000;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.gta-float-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gta-float-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gta-float-tag {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.gta-float-tag .tag-sep {
  opacity: 0.5;
  margin: 0 6px;
}

.gta-float-title {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gta-float-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gta-float-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.gta-float-btn {
  height: 52px;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(94, 53, 177, 0.5);
}

.gta-float-toggle {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.gta-float-toggle:hover {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
}

.gta-float-mobile-header {
  display: none;
}

/* Collapsed Mini-Badge */
.gta-float-badge {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(21, 27, 43, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 36px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: badgeEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gta-float-badge:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.4);
  color: var(--accent);
}

@keyframes badgeEntrance {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile Responsive - Strict Top-Bottom Two-Row Layout */
@media (max-width: 768px) {
  .gta-desktop-only {
    display: none !important;
  }
  .gta-float-bar {
    padding: 12px 0 14px;
  }
  .gta-float-inner {
    flex-direction: column;
    gap: 10px;
  }
  .gta-float-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .gta-float-mobile-header .gta-float-tag {
    font-size: 13px;
    font-weight: 700;
  }
  .gta-float-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .gta-float-mobile-actions .gta-float-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
  }
  .gta-float-mobile-actions .gta-float-toggle {
    width: 36px;
    height: 36px;
    border-radius: 6px;
  }
  .gta-float-content {
    width: 100%;
  }
  .gta-float-content .gta-float-text {
    display: none;
  }
  .gta-float-content .gta-float-video-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    max-height: 160px;
    border-radius: 8px;
  }
  .gta-float-badge {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 13px;
  }
}