/* Bagmutskiy — personal-data policy
   Formal document 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 header,
body.bagmutskiy-terms footer,
body.bagmutskiy-terms #masthead,
body.bagmutskiy-terms #colophon {
  overflow-x: clip;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.privacy {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --ink: #1a1916;
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  --header-offset: 7.5rem;
  --measure: 42rem;
  --wide: 48.5rem;
  counter-reset: privacy-sec;
  background: var(--paper);
  color: var(--ink);
  font-family: "Graphik Compact", "Source Sans 3", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  padding: 1.75rem 0 5.5rem;
  overflow-wrap: break-word;
}

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

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

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

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

.privacy-layout {
  display: grid;
  grid-template-columns: 13.25rem minmax(0, var(--wide));
  grid-template-areas:
    "toc mast"
    "toc summary"
    "toc rest";
  column-gap: 3.25rem;
  row-gap: 1.25rem;
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.privacy-toc-desktop {
  grid-area: toc;
}

.privacy-toc-mobile {
  display: none;
}

.privacy-mast {
  grid-area: mast;
}

.privacy-summary {
  grid-area: summary;
}

.privacy-doc {
  grid-area: rest;
}

.privacy-toc {
  position: sticky;
  top: calc(var(--header-offset) + 12px);
  align-self: start;
  z-index: 2;
  font-size: 0.8125rem;
  line-height: 1.35;
  max-height: calc(100vh - var(--header-offset) - 2rem);
  overflow: auto;
}

.privacy-toc-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.privacy-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--line);
}

.privacy-toc a {
  display: block;
  padding: 0.22rem 0 0.22rem 0.8rem;
  color: var(--muted);
  text-decoration: none;
  box-shadow: inset 2px 0 0 transparent;
}

.privacy-toc a:hover,
.privacy-toc a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--ink);
}

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

.privacy-mast h1 {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 18em;
}

.privacy-party {
  margin-top: 0.65rem;
  color: var(--ink);
  font-size: 1.02rem;
}

.privacy-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin-top: 1.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.privacy-meta dt {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.privacy-meta dd {
  margin-top: 0.15rem;
  font-weight: 600;
}

.privacy-plain {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: var(--measure);
}

.privacy-summary {
  max-width: var(--measure);
}

.privacy-summary h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

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

.facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.4rem 1.15rem;
  padding: 0.58rem 0;
  border-bottom: 1px solid var(--line);
}

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

.facts dt a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.facts dt a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.facts dd {
  font-weight: 500;
}

.privacy-section {
  counter-increment: privacy-sec;
  margin-top: 2.35rem;
  padding-top: 0.15rem;
  max-width: var(--wide);
}

.privacy-section[id],
.privacy-mast,
.privacy-summary,
.privacy #requests {
  scroll-margin-top: calc(var(--header-offset) + 14px);
}

.privacy-section:target > h2 {
  box-shadow: inset 0 -2px 0 var(--ink);
}

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

.privacy-section > h2 {
  scroll-margin-top: calc(var(--header-offset) + 14px);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.95rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.privacy-section > h2::before {
  content: counter(privacy-sec) ".\00a0";
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.privacy h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.45rem;
}

.privacy p + p,
.privacy p + ul,
.privacy ul + p,
.privacy p + ol,
.privacy ol + p,
.privacy .callout + p,
.privacy .purpose-list + p,
.privacy .processor-list + p,
.privacy .rights-list + p {
  margin-top: 0.8rem;
}

.privacy ul,
.privacy ol {
  padding-left: 1.15rem;
}

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

.callout {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  max-width: var(--measure);
}

.callout p + p {
  margin-top: 0.5rem;
}

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

.purpose-list {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.purpose {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1.15fr) 9.5rem 10.5rem;
  gap: 0.65rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.purpose-label {
  display: none;
}

.purpose h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.purpose p {
  margin: 0;
  font-size: 0.95rem;
}

.purpose-basis,
.purpose-term {
  color: var(--ink);
}

.purpose-head {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1.15fr) 9.5rem 10.5rem;
  gap: 0.65rem 1rem;
  padding: 0.35rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.processor-list {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.processor {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0.35rem 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.processor dt {
  font-weight: 600;
}

.processor dd {
  margin: 0;
}

.rights-list {
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.rights-list > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.4rem 1.15rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.rights-list dt {
  font-weight: 600;
}

.rights-list dd {
  margin: 0;
}

.request-box {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  background: #fffdf9;
  border: 1px solid var(--line);
  max-width: var(--measure);
}

.request-box .email {
  font-weight: 600;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.request-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.7rem;
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.copy-btn:hover,
.copy-btn.is-copied {
  background: var(--ink);
  color: #fffdf9;
}

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

.docs li {
  display: grid;
  gap: 0.12rem;
  padding: 0.75rem 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;
}

.privacy-related > h2::before,
.privacy-contact h2::before {
  content: none;
}

.privacy-section.privacy-related {
  counter-increment: none;
}

.privacy-related > h2 {
  border-bottom: 0;
  padding-bottom: 0;
}

.privacy-contact {
  margin-top: 2.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
}

.privacy-contact h2 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}

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

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

@media (max-width: 1100px) {
  .purpose-head {
    display: none;
  }

  .purpose {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    padding: 1rem 0 1.1rem;
  }

  .purpose-label {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.12rem;
  }

  .purpose h3 {
    font-size: 1.05rem;
  }
}

@media (max-width: 1024px) {
  .rights-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

@media (max-width: 900px) {
  .privacy-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "mast"
      "summary"
      "toc"
      "rest";
    max-width: 42rem;
    row-gap: 1.15rem;
  }

  .privacy-toc-desktop {
    display: none;
  }

  .privacy-toc-mobile {
    display: block;
    grid-area: toc;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .privacy-toc-mobile details {
    border: 1px solid var(--line);
    background: #fffdf9;
  }

  .privacy-toc-mobile summary {
    cursor: pointer;
    list-style: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
  }

  .privacy-toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .privacy-toc-mobile summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid var(--ink);
    border-bottom: 1.5px solid var(--ink);
    transform: rotate(45deg);
    margin-top: -0.2rem;
  }

  .privacy-toc-mobile details[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
  }

  .privacy-toc-mobile ol {
    border-left: 0;
    padding: 0 0.85rem 0.85rem;
  }

  .privacy-toc-mobile a {
    padding: 0.38rem 0.35rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    box-shadow: none;
  }

  .privacy-toc-mobile a:hover,
  .privacy-toc-mobile a[aria-current="true"] {
    box-shadow: none;
    color: var(--ink);
    text-decoration: underline;
  }

  .privacy-meta {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

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

  .privacy-section[id],
  .privacy-mast,
  .privacy-summary,
  .privacy #requests {
    scroll-margin-top: calc(var(--header-offset) + 12px);
  }

  .processor {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

@media (max-width: 430px) {
  .privacy-toc-mobile details {
    margin-right: 3.25rem;
  }

  .privacy-mast h1 {
    max-width: none;
  }
}

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

@media (max-width: 360px) {
  .privacy {
    font-size: 0.98rem;
  }

  .privacy-layout {
    padding: 0 1rem;
  }
}

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

@media print {
  .privacy-toc,
  .copy-btn,
  .contact-links {
    display: none !important;
  }

  body.bagmutskiy-terms header,
  body.bagmutskiy-terms #masthead,
  body.bagmutskiy-terms footer,
  body.bagmutskiy-terms #colophon,
  body.bagmutskiy-terms .elementor-location-header,
  body.bagmutskiy-terms .elementor-location-footer,
  body.bagmutskiy-terms .ast-desktop-header-wrap,
  body.bagmutskiy-terms .ast-mobile-header-wrap,
  body.bagmutskiy-terms .wpsr-fm-chat-wrapper,
  body.bagmutskiy-terms a:has(img[alt="chat"]),
  body.bagmutskiy-terms img[alt="chat"] {
    display: none !important;
  }

  .privacy {
    padding: 0;
    overflow: visible;
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.45;
  }

  .facts dt,
  .privacy-plain,
  .docs span,
  .privacy-kicker,
  .purpose-label,
  .source-link {
    color: #000;
  }

  .privacy-layout {
    display: block;
    max-width: none;
    padding: 0;
  }

  .privacy a {
    color: #000;
  }

  .privacy-section {
    break-inside: auto;
    margin-top: 1.4rem;
    max-width: none;
  }

  .privacy-section > h2,
  .purpose,
  .request-box {
    break-inside: avoid;
  }

  .callout,
  .request-box {
    background: transparent;
    border-color: #ccc;
  }

  .purpose-head {
    display: none;
  }

  .purpose {
    grid-template-columns: minmax(0, 1fr);
  }

  .purpose-label {
    display: block;
  }
}
