.page-faq {
  --faq-rail-w: 220px;
  --faq-gap: clamp(24px, 4vw, 56px);
  --faq-deco-line: rgba(199, 255, 67, 0.32);
  --faq-section-space: clamp(72px, 10vw, 128px);
  background:
    linear-gradient(180deg, rgba(46, 125, 255, 0.05) 0%, transparent 320px),
    var(--bg-ink);
  color: var(--text-primary);
}

.page-faq .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.page-faq .breadcrumb__item,
.page-faq .breadcrumb__sep {
  color: var(--text-secondary);
  text-decoration: none;
}

.page-faq .breadcrumb__item[aria-current="page"] {
  color: var(--data-green);
  font-weight: 600;
}

.page-faq .faq-hero {
  position: relative;
  padding-top: 48px;
  padding-bottom: 32px;
}

.page-faq .faq-hero::before {
  content: "";
  position: absolute;
  top: -72px;
  right: 0;
  width: 220px;
  height: 220px;
  background: repeating-linear-gradient(
    135deg,
    transparent 0px,
    transparent 8px,
    var(--line-grid) 8px,
    var(--line-grid) 9px
  );
  opacity: 0.5;
  pointer-events: none;
}

.page-faq .faq-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-faq .faq-hero__text {
  position: relative;
  padding-left: 12px;
}

.page-faq .faq-hero__text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(180deg, var(--data-green) 0%, var(--tech-blue) 100%);
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

.page-faq .faq-hero__text h1 {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.14;
  margin: 12px 0 18px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.page-faq .faq-hero__lead {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 24px;
}

.page-faq .faq-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-faq .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-grid);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.page-faq .badge--green {
  background: rgba(199, 255, 67, 0.1);
  border-color: rgba(199, 255, 67, 0.4);
  color: var(--data-green);
}

.page-faq .badge--blue {
  background: rgba(46, 125, 255, 0.1);
  border-color: rgba(46, 125, 255, 0.4);
  color: var(--tech-blue);
}

.page-faq .faq-hero__media {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-grid);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  background: var(--surface-code);
}

.page-faq .faq-hero__media::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(199, 255, 67, 0.2);
  pointer-events: none;
}

.page-faq .faq-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.9;
}

.page-faq .faq-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--faq-gap);
  padding-bottom: var(--faq-section-space);
}

.page-faq .faq-rail__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px;
  background: rgba(16, 23, 36, 0.7);
  border-left: 2px solid var(--data-green);
  border-radius: 0;
  overflow-x: auto;
}

.page-faq .faq-rail__title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-faq .faq-rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--line-grid);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: var(--surface-code);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.page-faq .faq-rail__link em {
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
  color: var(--tech-blue);
}

.page-faq .faq-rail__link:hover,
.page-faq .faq-rail__link:focus-visible {
  border-color: var(--data-green);
  background: rgba(199, 255, 67, 0.08);
  color: var(--data-green);
}

.page-faq .faq-rail__link:hover em,
.page-faq .faq-rail__link:focus-visible em {
  color: var(--data-green);
}

.page-faq .faq-rail__note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-grid);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.page-faq .faq-content {
  min-width: 0;
}

.page-faq .faq-section {
  position: relative;
  padding-top: 32px;
  padding-bottom: 48px;
  scroll-margin-top: 96px;
}

.page-faq .faq-section + .faq-section {
  border-top: 1px solid var(--line-grid);
  margin-top: 32px;
}

.page-faq .faq-section .chapter {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.page-faq .faq-section .chapter__no {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  background: var(--data-green);
  color: var(--bg-ink);
  padding: 6px 10px 6px 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.page-faq .faq-section:nth-of-type(2) .chapter__no {
  background: var(--tech-blue);
}

.page-faq .faq-section:nth-of-type(3) .chapter__no {
  background: var(--data-green);
}

.page-faq .faq-section:nth-of-type(4) .chapter__no {
  background: var(--hot-orange);
}

.page-faq .faq-section .chapter__label {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding-left: 8px;
  border-left: 1px solid var(--line-grid);
  line-height: 1.6;
}

.page-faq .faq-section .section-heading {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-faq .faq-section__intro {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.page-faq .faq-list {
  display: flex;
  flex-direction: column;
}

.page-faq .faq-item {
  position: relative;
  background: var(--surface-code);
  border: 1px solid var(--line-grid);
  border-left: 3px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.page-faq .faq-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: var(--data-green);
  opacity: 0;
  transition: opacity 0.25s ease, top 0.25s ease, bottom 0.25s ease;
}

.page-faq .faq-item[open]::before {
  opacity: 1;
  top: 12px;
  bottom: 12px;
}

.page-faq .faq-item[open] {
  border-color: rgba(199, 255, 67, 0.35);
  background: rgba(16, 23, 36, 0.95);
}

.page-faq .faq-item + .faq-item {
  margin-top: 12px;
}

.page-faq .faq-item:nth-child(2) {
  margin-top: 20px;
}

.page-faq .faq-item:nth-child(4) {
  margin-top: 18px;
}

.page-faq .faq-item__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s ease;
}

.page-faq .faq-item__summary::-webkit-details-marker {
  display: none;
}

.page-faq .faq-item__summary:hover {
  background: rgba(199, 255, 67, 0.04);
}

.page-faq .faq-item__summary:focus-visible {
  outline: 2px solid var(--data-green);
  outline-offset: -2px;
}

.page-faq .faq-item__no {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--tech-blue);
  line-height: 1;
  min-width: 30px;
  padding-right: 6px;
  border-right: 1px solid var(--line-grid);
}

.page-faq .faq-item[open] .faq-item__no {
  color: var(--data-green);
}

.page-faq .faq-item__title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.page-faq .faq-item__icon {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-grid);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.page-faq .faq-item__icon::before,
.page-faq .faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--text-secondary);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.page-faq .faq-item__icon::before {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 2px;
  transform: translateY(-50%);
}

.page-faq .faq-item__icon::after {
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 2px;
  transform: translateX(-50%);
}

.page-faq .faq-item[open] .faq-item__icon {
  border-color: var(--data-green);
}

.page-faq .faq-item[open] .faq-item__icon::before,
.page-faq .faq-item[open] .faq-item__icon::after {
  background: var(--data-green);
}

.page-faq .faq-item[open] .faq-item__icon::after {
  transform: translateX(-50%) scaleY(0);
}

.page-faq .faq-item__body {
  padding: 0 18px 20px 62px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
  animation: faqBodyFade 0.3s ease-out;
}

.page-faq .faq-item__body p {
  margin: 0 0 12px;
}

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

.page-faq .faq-item__body a {
  color: var(--tech-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(46, 125, 255, 0.5);
  transition: color 0.2s ease;
}

.page-faq .faq-item__body a:hover {
  color: var(--data-green);
  text-decoration-color: rgba(199, 255, 67, 0.6);
}

.page-faq .faq-compliance__media {
  position: relative;
  margin: 0 0 24px;
  border: 1px solid var(--line-grid);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  background: var(--surface-code);
}

.page-faq .faq-compliance__media::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0px,
    transparent 10px,
    rgba(46, 125, 255, 0.12) 10px,
    rgba(46, 125, 255, 0.12) 11px
  );
  pointer-events: none;
  z-index: 1;
}

.page-faq .faq-compliance__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

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

@media (min-width: 900px) {
  .page-faq .faq-hero {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  .page-faq .faq-hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
  }

  .page-faq .faq-hero__text {
    padding-left: 20px;
  }

  .page-faq .faq-hero__text h1 {
    font-size: clamp(36px, 5vw, 56px);
  }

  .page-faq .faq-hero__lead {
    font-size: 16px;
    max-width: 440px;
  }

  .page-faq .faq-layout {
    grid-template-columns: var(--faq-rail-w) minmax(0, 1fr);
    align-items: start;
    gap: 56px;
  }

  .page-faq .faq-rail__inner {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .page-faq .faq-rail__link {
    white-space: normal;
    padding: 12px 16px;
  }

  .page-faq .faq-section {
    padding-top: 40px;
    padding-bottom: 64px;
  }

  .page-faq .faq-section + .faq-section {
    margin-top: 48px;
  }

  .page-faq .faq-item + .faq-item {
    margin-top: 14px;
  }

  .page-faq .faq-item:nth-child(2) {
    margin-top: 28px;
  }

  .page-faq .faq-item:nth-child(4) {
    margin-top: 24px;
  }

  .page-faq .faq-item__summary {
    padding: 22px 24px;
  }

  .page-faq .faq-item__body {
    padding: 0 24px 22px 72px;
    font-size: 15px;
  }
}
