.page-faq {
  --faq-card-bg: #FFFFFF;
  --faq-bg-deep: #1A1A1A;
  --faq-soft-line: rgba(212, 175, 55, 0.22);
  background: #FAF3E0;
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

.page-faq .container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== FAQ Hero ===== */
.faq-hero {
  background: var(--faq-bg-deep);
  color: var(--color-ivory);
  padding: 34px 0 56px;
  position: relative;
  overflow: hidden;
}

.faq-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, transparent 22%, rgba(196, 22, 28, 0.55) 22%, rgba(196, 22, 28, 0.55) 68%, transparent 68%);
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 56% 100%);
  z-index: 0;
}

.faq-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold) 0%, rgba(212, 175, 55, 0.35) 60%, transparent 100%);
  z-index: 1;
}

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

.faq-hero .breadcrumb {
  margin-bottom: 28px;
  font-size: 14px;
  color: rgba(250, 243, 224, 0.7);
}

.faq-hero .breadcrumb a {
  color: var(--color-gold);
  text-decoration: none;
}

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

.faq-hero .breadcrumb .breadcrumb__sep {
  margin: 0 8px;
  color: rgba(250, 243, 224, 0.4);
}

.faq-hero .breadcrumb [aria-current="page"] {
  color: var(--color-ivory);
}

.faq-hero__grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.faq-hero__content {
  max-width: 720px;
}

.faq-hero .eyebrow {
  color: var(--color-gold);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.faq-hero__content h1 {
  margin: 0 0 16px;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.3;
  color: var(--color-ivory);
  letter-spacing: 0.01em;
}

.faq-hero__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(250, 243, 224, 0.85);
  max-width: 560px;
}

.faq-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 22px;
  font-size: 14px;
  color: rgba(250, 243, 224, 0.72);
}

.faq-hero__meta .stat-number {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-weight: 700;
  color: var(--color-gold);
}

.faq-hero__visual {
  display: none;
  position: relative;
  justify-self: end;
}

.faq-hero__tile {
  width: 176px;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.45));
  transform: rotate(2deg);
}

.faq-hero__glint {
  position: absolute;
  top: 6%;
  right: 2%;
  width: 64px;
  height: 64px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== FAQ Main ===== */
.faq-main {
  padding: 44px 0 72px;
  background:
    linear-gradient(rgba(196, 22, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 22, 28, 0.035) 1px, transparent 1px),
    var(--color-ivory);
  background-size: 32px 32px;
  background-position: center top;
}

.faq-layout {
  display: grid;
  gap: 28px;
}

/* ===== Sidebar ===== */
.faq-sidebar__inner {
  background: var(--color-ivory);
  border: 1px solid var(--faq-soft-line);
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-card);
}

.faq-sidebar__title {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--faq-soft-line);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.faq-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-sidebar__list li + li {
  margin-top: 0;
}

.faq-sidebar__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.faq-sidebar__list a:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--color-gold);
  color: var(--color-red);
}

.faq-sidebar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
}

.faq-sidebar__card {
  display: none;
}

.faq-main:has(#faq-record:target) .faq-sidebar__list a[href="#faq-record"],
.faq-main:has(#faq-mobile:target) .faq-sidebar__list a[href="#faq-mobile"],
.faq-main:has(#faq-collection:target) .faq-sidebar__list a[href="#faq-collection"],
.faq-main:has(#faq-version:target) .faq-sidebar__list a[href="#faq-version"],
.faq-main:has(#faq-security:target) .faq-sidebar__list a[href="#faq-security"] {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-ivory);
}

.faq-main:has(#faq-record:target) .faq-sidebar__list a[href="#faq-record"] .faq-sidebar__dot,
.faq-main:has(#faq-mobile:target) .faq-sidebar__list a[href="#faq-mobile"] .faq-sidebar__dot,
.faq-main:has(#faq-collection:target) .faq-sidebar__list a[href="#faq-collection"] .faq-sidebar__dot,
.faq-main:has(#faq-version:target) .faq-sidebar__list a[href="#faq-version"] .faq-sidebar__dot,
.faq-main:has(#faq-security:target) .faq-sidebar__list a[href="#faq-security"] .faq-sidebar__dot {
  background: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

/* ===== FAQ Content Sections ===== */
.faq-content {
  min-width: 0;
}

.faq-section {
  scroll-margin-top: 90px;
  margin-bottom: 44px;
}

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

.faq-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--faq-soft-line);
  position: relative;
}

.faq-section__head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 64px;
  height: 2px;
  background: var(--color-gold);
}

.faq-section__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: rgba(196, 22, 28, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 22, 28, 0.16);
}

.faq-section__head h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.25;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}

/* ===== Accordion Items ===== */
.faq-item {
  margin-bottom: 12px;
}

.faq-item details {
  background: var(--faq-card-bg);
  border: 1px solid var(--faq-soft-line);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.faq-item details[open] {
  border-color: var(--color-gold);
  border-left-color: var(--color-red);
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.12);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px 15px 14px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-ink);
  transition: color 0.22s ease;
}

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

.faq-item summary:hover {
  color: var(--color-red);
}

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-gold);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item details[open] summary {
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}

.faq-item details[open] summary::after {
  content: "−";
}

.faq-item__q {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 4px;
  background: var(--color-red);
  color: var(--color-ivory);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  transform: skewX(-6deg);
}

.faq-item__body {
  padding: 14px 18px 18px 54px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-gray);
}

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

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

.faq-item__body a {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.22s ease;
}

.faq-item__body a:hover {
  color: var(--color-brass);
}

/* ===== Figure ===== */
.faq-figure-wrap {
  margin: 22px 0 0;
  padding: 10px;
  background: var(--faq-card-bg);
  border: 1px solid var(--faq-soft-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.faq-figure-wrap img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) + 2px);
}

.faq-figure__caption {
  margin: 10px 4px 2px;
  font-size: 13px;
  color: var(--color-gray);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .faq-hero__content h1 {
    font-size: 34px;
  }

  .faq-hero__lead {
    font-size: 16px;
  }

  .faq-sidebar__list a {
    padding: 9px 14px;
    font-size: 15px;
  }
}

@media (min-width: 900px) {
  .faq-hero {
    padding: 42px 0 60px;
  }

  .faq-hero__grid {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }

  .faq-hero__visual {
    display: block;
  }

  .faq-main {
    padding: 52px 0 80px;
  }

  .faq-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
  }

  .faq-sidebar {
    position: sticky;
    top: 92px;
  }

  .faq-sidebar__list {
    display: block;
  }

  .faq-sidebar__list li + li {
    margin-top: 6px;
  }

  .faq-sidebar__list a {
    display: flex;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius);
  }

  .faq-sidebar__list a:hover {
    background: rgba(212, 175, 55, 0.12);
    border: none;
  }

  .faq-sidebar__card {
    display: block;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--faq-soft-line);
  }

  .faq-sidebar__card p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-gray);
  }

  .faq-sidebar__card .btn {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
  }

  .faq-sidebar__card .btn--ghost {
    margin-bottom: 0;
  }

  .faq-section__head h2 {
    font-size: 24px;
  }

  .faq-item summary {
    padding: 17px 20px;
    font-size: 16px;
  }

  .faq-item__body {
    padding: 16px 20px 20px 56px;
    font-size: 15px;
  }

  .faq-figure-wrap {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .faq-hero__content h1 {
    font-size: 24px;
  }

  .faq-item__body {
    padding-left: 18px;
  }

  .faq-item summary {
    padding-left: 12px;
  }

  .faq-item__q {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 12px;
  }
}
