/* Bagmutskiy — site-wide FAQ / help hub
   Theme shell today; fullbleed-ready (same contract as price/contact). */

/*
 * Standalone baseline formerly supplied implicitly by Astra/Elementor.
 * Without it UA `body { margin: 8px }` insets the document and opens a gap
 * under #gs-header. Contact/price lesson — keep page-scoped, not in shell.css.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #f4f2ee;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: #f4f2ee;
  color: #1a1916;
}

.bagmutskiy-terms .entry-header,
.bagmutskiy-terms-main .entry-header {
  display: none;
}

body.bagmutskiy-terms,
body.bagmutskiy-terms #page,
body.bagmutskiy-terms #content,
body.bagmutskiy-terms #primary,
body.bagmutskiy-terms .site-main,
body.bagmutskiy-terms .ast-container {
  background: #f4f2ee;
}

html:has(body.bagmutskiy-terms) {
  overflow-x: visible;
}

body.bagmutskiy-terms {
  overflow-x: visible;
}

body.bagmutskiy-terms footer,
body.bagmutskiy-terms #colophon {
  overflow-x: clip;
}

.bagmutskiy-terms #primary,
.bagmutskiy-terms-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.faq-hub {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --ink: #1a1916;
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  --header-offset: 7.5rem;
  --measure: 46rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Graphik", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  padding: 1.75rem 0 4.75rem;
  overflow-wrap: break-word;
}

.faq-hub *,
.faq-hub *::before,
.faq-hub *::after {
  box-sizing: border-box;
}

.faq-hub :where(h1, h2, h3, p, ul, ol, nav) {
  margin: 0;
}

.faq-hub a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.faq-hub a:hover {
  color: #12291f;
}

.faq-hub a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.faq-hub-layout {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.faq-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.faq-hub h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.faq-lead {
  margin-top: 0.85rem;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.faq-note {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.faq-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.15rem 0;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.faq-topics a:hover {
  border-bottom-color: var(--accent);
}

.faq-group {
  margin-top: 2.6rem;
}

.faq-group,
.faq-item,
.faq-formats,
.faq-contact,
.faq-group h2,
.faq-item h3,
.faq-formats h2,
.faq-contact h2 {
  scroll-margin-top: calc(var(--header-offset) + 0.75rem);
}

.faq-group h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.faq-item {
  padding: 1.05rem 0 1.15rem;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.faq-item p {
  max-width: 42rem;
  margin-top: 0.55rem;
}

.faq-item p + p {
  margin-top: 0.55rem;
}

.faq-item .faq-route {
  margin-top: 0.7rem;
}

.faq-formats,
.faq-contact {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.faq-formats h2,
.faq-contact h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.faq-formats p,
.faq-contact p {
  margin-top: 0.7rem;
  max-width: 42rem;
}

.faq-routes,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 0.85rem;
  padding: 0;
  list-style: none;
}

.faq-routes a,
.contact-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.faq-routes a:hover,
.contact-links a:hover {
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .faq-hub {
    --header-offset: 6.5rem;
    font-size: 1rem;
    padding: 1.25rem 0 calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .faq-lead {
    font-size: 1.12rem;
  }

  .faq-group {
    margin-top: 2.15rem;
  }

  .faq-item h3 {
    font-size: 1.08rem;
  }
}

@media (max-width: 360px) {
  .faq-hub-layout {
    padding: 0 1rem;
  }
}
