:root {
  --color-bg-deep: #111629;
  --color-bg-mid: #1B2237;
  --color-bg-surface: #262C40;
  --color-bg-hover: #424C6C;
  --color-accent: #0372FF;
  --color-accent-hover: #024FB2;
  --color-border: #424C6C;
  --color-text: #FFFFFF;
  --color-text-muted: rgba(255, 255, 255, 0.6);
  --color-shadow: #111629;
  --font-pixel: 'PixelOperator', monospace;
  --font-body: 'IBMPlexMono', sans-serif;
}

/* =============================================
   GLOBAL PAGE WRAPPER FOR SUB-PAGES
   ============================================= */

.subpage-wrapper {
  background-color: var(--color-bg-deep);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.375;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.subpage-container {
  width: 1100px;
  max-width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 0 60px 0;
}

/* =============================================
   SUBPAGE HEADER / NAV
   ============================================= */

.subpage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.subpage-nav .nav-logo img {
  height: 32px;
  display: block;
}

.subpage-nav .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subpage-nav .nav-link {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
  padding: 5px 16px;
  height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  transition: background 80ms linear;
}

.subpage-nav .nav-link:hover {
  background: rgba(3, 114, 255, 0.2);
  text-decoration: none;
}

.subpage-nav .nav-link.active {
  background: rgba(3, 114, 255, 0.2);
}

/* =============================================
   H1 HERO TITLE
   ============================================= */

.hero-title {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  color: var(--color-text);
  margin: 0 0 0.5em 0;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-title span.hero-accent {
  color: var(--color-accent);
}

.subpage-hero {
  margin: 40px 0 50px 0;
  padding: 0;
}

.subpage-hero p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 10px 0 0 0;
  max-width: 700px;
}

/* =============================================
   SECTION CARD (matching .section.has-shadow)
   ============================================= */

.rs-section {
  padding: 24px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-mid);
  box-shadow: 4px 4px var(--color-shadow);
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.rs-section + .rs-section {
  margin-top: 24px;
}

/* =============================================
   INDEX.HTML FAQ BLOCK
   ============================================= */

.faq-index-section {
  max-width: 100%;
  overflow-x: hidden;
  margin-top: 80px;
  margin-bottom: 0;
  padding: 0;
}

.faq-index-section .faq-seo-title {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 40px);
  color: var(--color-text);
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.faq-index-section .faq-seo-title span {
  color: var(--color-accent);
}

.faq-index-section .faq-intro {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 0 32px 0;
  line-height: 1.5;
}

/* =============================================
   FAQ ACCORDION ITEMS
   ============================================= */

.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-mid);
  margin-bottom: -1px;
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.faq-item:first-child {
  box-shadow: 4px 4px var(--color-shadow);
}

.faq-item.faq-open {
  border-color: rgba(66, 76, 108, 0.7);
  background-color: rgba(38, 44, 64, 0.4);
  z-index: 1;
}

.faq-question {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  box-sizing: border-box;
  transition: background 80ms linear;
  line-height: 1.3;
}

.faq-question:hover {
  background: rgba(38, 44, 64, 0.5);
}

.faq-open .faq-question {
  background: var(--color-bg-surface);
}

.faq-question::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("arrow.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: transform 200ms ease;
  opacity: 0.7;
}

.faq-open .faq-question::after {
  transform: rotate(180deg);
  opacity: 1;
}

.faq-answer-wrapper {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 250ms ease;
  opacity: 0;
}

.faq-open .faq-answer-wrapper {
  max-height: 600px;
  opacity: 1;
}

.faq-answer {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
  padding: 16px 16px 20px 16px;
  line-height: 1.6;
  background: rgba(38, 44, 64, 0.4);
  border-top: 1px solid var(--color-border);
  box-sizing: border-box;
}

.faq-answer a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* =============================================
   FAQ FOOTER LINKS (on index.html)
   ============================================= */

.faq-footer-links {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
  align-items: center;
}

.faq-footer-links .rs-btn-primary {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background-color: var(--color-accent);
  border: 2px solid transparent;
  padding: 7px 18px;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  transition: transform 80ms linear, background-color 80ms linear;
  cursor: pointer;
  line-height: 1.2em;
}

.faq-footer-links .rs-btn-primary:hover {
  background-color: var(--color-bg-surface);
  box-shadow: 0.3em 0.3em var(--color-shadow);
  transform: scale(0.9);
  text-decoration: none;
}

.faq-footer-links .rs-btn-secondary {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(3, 114, 255, 0.5);
  padding: 7px 18px;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  transition: transform 80ms linear, background-color 80ms linear;
  cursor: pointer;
  line-height: 1.2em;
}

.faq-footer-links .rs-btn-secondary:hover {
  background-color: var(--color-bg-surface);
  border-color: transparent;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  transform: scale(0.9);
  text-decoration: none;
}

/* =============================================
   INTERNAL LINK BUTTONS (general reusable)
   ============================================= */

.rs-btn-primary {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background-color: var(--color-accent);
  border: 2px solid transparent;
  padding: 7px 18px;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  transition: transform 80ms linear, background-color 80ms linear;
  cursor: pointer;
  line-height: 1.2em;
}

.rs-btn-primary:hover {
  background-color: var(--color-bg-surface);
  box-shadow: 0.3em 0.3em var(--color-shadow);
  transform: scale(0.9);
  text-decoration: none;
  color: #fff;
}

.rs-btn-secondary {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(3, 114, 255, 0.5);
  padding: 7px 18px;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  transition: transform 80ms linear, background-color 80ms linear;
  cursor: pointer;
  line-height: 1.2em;
}

.rs-btn-secondary:hover {
  background-color: var(--color-bg-surface);
  border-color: transparent;
  box-shadow: 0.3em 0.3em var(--color-shadow);
  transform: scale(0.9);
  text-decoration: none;
  color: #fff;
}

.rs-link-inline {
  color: var(--color-accent);
  font-weight: 700;
  font-family: var(--font-pixel);
  text-decoration: none;
  font-size: 16px;
}

.rs-link-inline:hover {
  text-decoration: underline;
}

/* =============================================
   SUBPAGE FOOTER
   ============================================= */

.subpage-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 100px 0 30px;
  padding: 5px 0;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.subpage-footer .footer-logo img {
  height: 32px;
  display: block;
}

.subpage-footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.subpage-footer .footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-family: var(--font-body);
  text-decoration: none;
  transition: color 80ms linear;
}

.subpage-footer .footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.subpage-footer .footer-ens {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
}

/* =============================================
   FAQ FULL PAGE LAYOUT
   ============================================= */

.faq-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.faq-page-item {
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-mid);
  margin-bottom: -1px;
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.faq-page-item:first-child {
  box-shadow: 4px 4px var(--color-shadow);
}

.faq-page-item.faq-open {
  background-color: rgba(38, 44, 64, 0.4);
  z-index: 1;
}

.faq-page-question {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
  margin: 0;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  box-sizing: border-box;
  transition: background 80ms linear;
  line-height: 1.3;
}

.faq-page-question:hover {
  background: rgba(38, 44, 64, 0.5);
}

.faq-page-item.faq-open .faq-page-question {
  background: var(--color-bg-surface);
}

.faq-page-question::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("../arrow.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: transform 200ms ease;
  opacity: 0.7;
}

.faq-page-item.faq-open .faq-page-question::after {
  transform: rotate(180deg);
  opacity: 1;
}

.faq-page-answer-wrapper {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 250ms ease;
  opacity: 0;
}

.faq-page-item.faq-open .faq-page-answer-wrapper {
  max-height: 800px;
  opacity: 1;
}

.faq-page-answer {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
  padding: 18px 18px 24px 18px;
  line-height: 1.6;
  background: rgba(38, 44, 64, 0.4);
  border-top: 1px solid var(--color-border);
  box-sizing: border-box;
}

.faq-page-answer a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.faq-page-answer a:hover {
  text-decoration: underline;
}

.faq-page-answer p {
  margin: 0 0 10px 0;
}

.faq-page-answer p:last-child {
  margin-bottom: 0;
}

/* =============================================
   ABOUT PAGE LAYOUT
   ============================================= */

.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text);
  margin: 0 0 16px 0;
  padding: 0;
  line-height: 1.2;
}

.about-section p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0 0 12px 0;
}

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

.about-section a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.about-section a:hover {
  text-decoration: underline;
}

.about-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.about-grid-item {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 20px;
  background: var(--color-bg-mid);
  border: 1px solid var(--color-border);
  box-shadow: 4px 4px var(--color-shadow);
  box-sizing: border-box;
}

.about-grid-item h3 {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.about-grid-item p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0;
}

/* =============================================
   STAT ROW (for about/faq pages)
   ============================================= */

.rs-stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.rs-stat-item {
  flex: 1 1 160px;
  min-width: 130px;
}

.rs-stat-item .stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-body);
}

.rs-stat-item .stat-value {
  font-family: var(--font-pixel);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  line-height: 1.1;
}

/* =============================================
   DIVIDER
   ============================================= */

.rs-divider {
  border: 0;
  height: 2px;
  background: var(--color-bg-surface);
  margin: 40px 0;
}

/* =============================================
   PAGE CTA / BOTTOM LINKS BLOCK
   ============================================= */

.page-cta-block {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  align-items: center;
  flex-wrap: wrap;
}

.page-cta-block .cta-label {
  color: var(--color-text-muted);
  font-size: 14px;
  font-family: var(--font-body);
}

/* =============================================
   ACCORDION ANIMATION (index.html JS accordion)
   ============================================= */

.faq-answer-wrapper,
.faq-page-answer-wrapper {
  will-change: max-height, opacity;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-open .faq-answer {
  animation: faqFadeIn 200ms ease forwards;
}

.faq-page-item.faq-open .faq-page-answer {
  animation: faqFadeIn 200ms ease forwards;
}

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

@media screen and (max-width: 1000px) {
  .subpage-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media screen and (max-width: 750px) {
  .hero-title {
    font-size: clamp(22px, 6vw, 32px);
  }

  .faq-index-section .faq-seo-title {
    font-size: clamp(20px, 5vw, 30px);
  }

  .about-grid {
    flex-direction: column;
  }

  .rs-stat-row {
    gap: 16px;
  }

  .faq-footer-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-cta-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .subpage-nav {
    height: auto;
    margin: 12px 0;
  }

  .subpage-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 60px;
  }

  .subpage-footer .footer-ens {
    margin-left: 0;
  }

  .faq-question {
    font-size: 15px;
    padding: 12px 12px;
  }

  .faq-page-question {
    font-size: 15px;
    padding: 12px 12px;
  }

  .rs-btn-primary,
  .rs-btn-secondary,
  .faq-footer-links .rs-btn-primary,
  .faq-footer-links .rs-btn-secondary {
    font-size: 16px;
    padding: 7px 14px;
  }
}

@media screen and (max-width: 480px) {
  .about-grid-item {
    min-width: 100%;
  }

  .rs-stat-item {
    min-width: 40%;
  }
}