/* P6b standalone baseline (Astra/Elementor previously supplied).
 * Without it UA body margin insets the document under #gs-header.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

/* Bagmutskiy — guarantees / trust hub
   Informational page inside the live site chrome. */

.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;
}

.terms {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --ink: #1a1916;
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  --header-offset: 7.5rem;
  --measure: 40rem;
  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: 2rem 0 5.5rem;
  overflow-wrap: break-word;
}

.terms :where(h1, h2, h3, p, ul, ol, dl) {
  margin: 0;
}

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

.terms a:hover {
  color: #12291f;
}

.terms a:focus-visible,
.terms summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

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

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

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

.terms-hero p + p {
  margin-top: 0.85rem;
}

.terms-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.terms .btn {
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 2px;
  box-sizing: border-box;
}

.terms .btn-primary {
  background: var(--ink);
  color: #fffdf9;
}

.terms .btn-primary:hover {
  background: #000;
  color: #fffdf9;
}

.terms .btn-secondary {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.terms .btn-secondary:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.terms-summary {
  margin-top: 2.2rem;
}

.terms-section {
  margin-top: 2.6rem;
}

.terms-section[id],
.terms-summary,
.terms #contact {
  scroll-margin-top: calc(var(--header-offset) + 12px + 0.75rem);
}

.terms h1,
.terms h2,
.terms h3 {
  color: var(--ink);
}

.terms h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}

.terms h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.terms p + p,
.terms p + ul,
.terms ul + p,
.terms h3 + p {
  margin-top: 0.7rem;
}

.facts {
  display: grid;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0.55rem 1.25rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-weight: 400;
}

.facts dd {
  font-weight: 600;
}

.commitments {
  display: grid;
  gap: 1.35rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.commitments article + article {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.remedy {
  padding: 1rem 1.1rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
}

.remedy p + p {
  margin-top: 0.7rem;
}

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

.terms ul.plain {
  padding-left: 1.15rem;
  margin-top: 0.55rem;
}

.terms li + li {
  margin-top: 0.35rem;
}

.docs {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.docs li {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.docs a {
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.docs a:hover {
  text-decoration: underline;
}

.docs span {
  color: var(--muted);
  font-size: 0.95rem;
}

.proof-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 0.7rem;
}

.proof-links a,
.contact-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.7rem 0;
  list-style: none;
}

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

.faq details p {
  padding: 0 0 0.95rem;
  color: var(--ink);
}

.terms-contact {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

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

  .facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .terms .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .terms {
    padding: 0;
    background: #fff;
    color: #000;
  }

  .hero-actions,
  .contact-links {
    display: none;
  }
}
