.page-faq {
  --faq-radius: 14px;
  background: var(--c-rice);
  color: var(--c-ink);
}

.page-faq [id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.page-faq a:focus-visible,
.page-faq summary:focus-visible {
  outline: 3px solid var(--c-tech);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Hero ===== */
.faq-hero {
  position: relative;
  min-height: 520px;
  padding: calc(var(--header-h) + 44px) 0 68px;
  background: var(--c-ink);
  color: var(--c-rice);
  overflow: hidden;
}

.faq-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.faq-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.faq-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(11, 20, 32, 0.97) 0%, rgba(11, 20, 32, 0.88) 42%, rgba(36, 48, 62, 0.68) 100%);
}

.faq-hero__ray {
  position: absolute;
  top: -18%;
  bottom: -10%;
  right: -8%;
  width: 44%;
  z-index: 1;
  background: linear-gradient(120deg, transparent 0%, rgba(30, 113, 255, 0.12) 52%, rgba(232, 53, 44, 0.18) 100%);
  transform: skewX(-16deg);
}

.faq-hero__content {
  position: relative;
  z-index: 2;
}

.faq-hero__tag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}

.faq-hero__tag-text {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(244, 241, 234, 0.72);
}

.faq-hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
  transform: skewX(-4deg);
  text-shadow: 5px 5px 0 rgba(232, 53, 44, 0.34), 10px 10px 0 rgba(6, 10, 16, 0.45);
}

.faq-hero__lead {
  max-width: 560px;
  margin: 20px 0 26px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(244, 241, 234, 0.82);
}

.faq-hero__catalog {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.faq-hero__cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(244, 241, 234, 0.08);
  color: var(--c-rice);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
  transition: background 0.24s ease, color 0.24s ease;
}

.faq-hero__cat-num {
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: var(--c-gold);
  transition: color 0.24s ease;
}

.faq-hero__cat:hover {
  background: var(--c-gold);
  color: var(--c-ink);
}

.faq-hero__cat:hover .faq-hero__cat-num {
  color: var(--c-ink);
}

.faq-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 520px;
  border-top: 1px solid rgba(244, 241, 234, 0.18);
  padding-top: 22px;
  margin: 0;
}

.faq-hero__stat {
  display: grid;
  gap: 4px;
}

.faq-hero__stat-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.55);
}

.faq-hero__stat-value {
  font-family: var(--font-data);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-gold);
  line-height: 1;
}

.faq-hero__axis {
  position: absolute;
  z-index: 2;
  right: 18px;
  top: calc(var(--header-h) + 80px);
  writing-mode: vertical-rl;
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  color: rgba(244, 241, 234, 0.3);
}

.faq-hero__axis::after {
  content: "";
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--c-gold), transparent);
  margin: 12px auto 0;
}

.faq-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  z-index: 3;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-gold) 55%, var(--c-tech) 100%);
}

/* ===== FAQ Body ===== */
.faq-body {
  padding: 0 0 88px;
}

.faq-body__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 28px 0 18px;
  border-bottom: 1px dashed rgba(11, 20, 32, 0.2);
  margin-bottom: 8px;
}

.faq-body__stat {
  margin: 0;
  font-family: var(--font-data);
  font-size: 0.84rem;
  color: var(--c-rock);
}

.faq-body__stat strong {
  font-size: 2rem;
  color: var(--c-primary);
  margin-right: 4px;
}

.faq-body__hint {
  margin: 0;
  max-width: 420px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--c-rock);
}

.faq-body__inner {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

/* ===== Rail ===== */
.faq-rail {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 14px 0 8px;
  scrollbar-width: none;
}

.faq-rail::-webkit-scrollbar {
  display: none;
}

.faq-rail__label {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-rock);
  padding: 8px 4px;
}

.faq-rail__link {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--c-ink);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 20, 32, 0.06);
  transition: background 0.24s ease, color 0.24s ease;
}

.faq-rail__link:hover {
  background: var(--c-primary);
  color: var(--c-rice);
}

.faq-groups {
  min-width: 0;
}

/* ===== FAQ Group ===== */
.faq-group {
  padding: 36px 0 8px;
}

.faq-group + .faq-group {
  border-top: 1px dashed rgba(11, 20, 32, 0.18);
  margin-top: 28px;
}

.faq-group:target {
  animation: faqGroupFlash 1.2s ease both;
}

@keyframes faqGroupFlash {
  0% {
    background: rgba(245, 185, 66, 0.18);
  }
  100% {
    background: transparent;
  }
}

.faq-group__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: start;
  margin: 0 0 22px;
  position: relative;
}

.faq-group__num {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 0.9;
  grid-row: span 2;
  color: var(--c-primary);
  opacity: 0.35;
  -webkit-text-stroke: 1px rgba(232, 53, 44, 0.75);
}

.faq-group__title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  margin: 2px 0 4px;
  display: inline-block;
}

.faq-group__title::after {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-gold));
  transform: skewX(-24deg);
}

.faq-group__desc {
  margin: 2px 0 0;
  color: var(--c-rock);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 420px;
}

/* ===== FAQ Item ===== */
.faq-group__list {
  display: grid;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border-radius: var(--faq-radius);
  box-shadow: 0 2px 8px rgba(11, 20, 32, 0.05);
  border: 1px solid rgba(11, 20, 32, 0.06);
  overflow: hidden;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.faq-item[open] {
  background: var(--c-ink);
  color: var(--c-rice);
  border-color: var(--c-ink);
  box-shadow: 0 6px 18px rgba(11, 20, 32, 0.24);
}

.faq-item__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  min-height: 54px;
}

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

.faq-item__summary::marker {
  content: "";
}

.faq-item__summary:hover {
  background: rgba(11, 20, 32, 0.03);
}

.faq-item[open] .faq-item__summary:hover {
  background: rgba(244, 241, 234, 0.05);
}

.faq-item__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(245, 185, 66, 0.14);
  color: var(--c-gold);
  transition: background 0.24s ease, color 0.24s ease;
}

.faq-item[open] .faq-item__icon {
  background: var(--c-gold);
  color: var(--c-ink);
}

.faq-item__icon svg {
  width: 18px;
  height: 18px;
}

.faq-item__question {
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.4;
}

.faq-item__state {
  flex: 0 0 auto;
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--c-rock);
  transition: transform 0.28s ease, color 0.28s ease;
}

.faq-item[open] .faq-item__state {
  transform: rotate(180deg);
  color: var(--c-gold);
}

.faq-item__state svg {
  width: 16px;
  height: 16px;
}

.faq-item__answer {
  padding: 2px 18px 20px 66px;
}

.faq-item__answer p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--c-rock);
  max-width: 66ch;
}

.faq-item[open] .faq-item__answer p {
  color: rgba(244, 241, 234, 0.8);
}

.faq-item__rel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 20, 32, 0.1);
}

.faq-item[open] .faq-item__rel {
  border-top-color: rgba(244, 241, 234, 0.14);
}

.faq-item__rel-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-rock);
}

.faq-item[open] .faq-item__rel-label {
  color: rgba(244, 241, 234, 0.5);
}

.faq-item[open] .link-more {
  color: var(--c-gold);
}

@media (max-width: 480px) {
  .faq-item__answer {
    padding-left: 18px;
  }
}

/* ===== FAQ Help / Contact ===== */
.faq-help {
  position: relative;
  background: var(--c-ink);
  color: var(--c-rice);
  padding: 72px 0 84px;
  overflow: hidden;
}

.faq-help::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 38%;
  height: 120%;
  background: linear-gradient(160deg, transparent 30%, rgba(30, 113, 255, 0.1) 60%, rgba(232, 53, 44, 0.14) 100%);
  transform: rotate(8deg);
}

.faq-help__head {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin-bottom: 36px;
}

.faq-help__head h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  margin: 12px 0 8px;
  line-height: 1.06;
}

.faq-help__head p {
  color: rgba(244, 241, 234, 0.72);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0;
}

.faq-help__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.faq-help__card {
  border-radius: 16px;
  padding: 30px 24px;
  position: relative;
}

.faq-help__card--rice {
  background: var(--c-rice);
  color: var(--c-ink);
  clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%, 0 20px);
}

.faq-help__card--slate {
  background: var(--c-slate);
  color: var(--c-rice);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.faq-help__subtitle {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin: 0 0 18px;
  display: inline-block;
}

.faq-help__subtitle::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 8px;
  background: var(--c-gold);
  transform: skewX(-24deg);
}

.faq-help__contact {
  display: grid;
  gap: 12px;
}

.faq-help__contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(11, 20, 32, 0.05);
  border-left: 3px solid var(--c-primary);
  border-radius: 8px;
  transition: background 0.24s ease, border-color 0.24s ease;
}

.faq-help__contact-item:hover {
  background: rgba(232, 53, 44, 0.06);
  border-left-color: var(--c-gold);
}

.faq-help__contact-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(232, 53, 44, 0.1);
  color: var(--c-primary);
}

.faq-help__contact-icon svg {
  width: 18px;
  height: 18px;
}

.faq-help__contact-set {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.faq-help__contact-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--c-rock);
}

.faq-help__contact-value {
  font-family: var(--font-data);
  font-size: 0.98rem;
  font-weight: 600;
  word-break: break-all;
  color: var(--c-ink);
}

.faq-help__note {
  margin: 18px 0 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--c-rock);
}

.faq-help__img {
  margin: 20px -24px -30px;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

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

.faq-help__scope {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.faq-help__scope-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: rgba(11, 20, 32, 0.38);
  border-radius: 10px;
}

.faq-help__scope-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(30, 113, 255, 0.16);
  color: var(--c-tech);
}

.faq-help__scope-icon svg {
  width: 16px;
  height: 16px;
}

.faq-help__scope-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 3px;
}

.faq-help__scope-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.7);
}

.faq-help__action {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

@media (min-width: 900px) {
  .faq-help {
    padding: 96px 0 104px;
  }

  .faq-help__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    align-items: stretch;
  }

  .faq-help__card {
    padding: 38px 34px;
  }

  .faq-help__img {
    margin: 24px -34px -38px;
  }

  .faq-group {
    padding: 52px 0 20px;
  }

  .faq-group + .faq-group {
    margin-top: 36px;
  }

  .faq-body {
    padding-bottom: 96px;
  }
}

@media (min-width: 1024px) {
  .faq-body__inner {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    margin-top: 28px;
  }

  .faq-rail {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0;
    overflow: visible;
  }

  .faq-rail__label {
    padding: 0 4px 10px;
  }

  .faq-rail__link {
    border-radius: 8px;
    border-left: 3px solid transparent;
    background: transparent;
    padding: 10px 12px;
  }

  .faq-rail__link:hover {
    background: rgba(11, 20, 32, 0.06);
    color: var(--c-ink);
    border-left-color: var(--c-primary);
  }

  .faq-hero {
    min-height: 560px;
    padding-top: calc(var(--header-h) + 56px);
  }
}
