/* Правовые страницы (privacy, terms, refund, recurring, recurring-consent, privacy-chrome и их /en/)
   в стиле статьи прототипа (src/pages/article.html): заголовок по центру, слева оглавление с
   номерами, по центру колонка текста Literata. Общие кнопки и анимации — assets/page/doc.css. */

body {
  margin: 0;
  background: #F6F6F3;
  color: #121212;
  font-family: Onest, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }
::selection { background: #121212; color: #F6F6F3; }

main.wrap {
  max-width: 1376px;
  margin: 0 auto;
  padding: 88px 32px 168px;
  box-sizing: border-box;
}

.doc-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  color: #55585E;
  font-size: 13px;
}
.pdot { width: 7px; height: 7px; border-radius: 50%; background: #FF5A1F; }

main.wrap > h1 {
  max-width: 22ch;
  margin: 0 auto;
  font: 500 clamp(34px, 4.4vw, 56px)/1.08 Onest, system-ui, sans-serif;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.doc-meta {
  max-width: 640px;
  margin: 40px auto 0;
  color: #55585E;
  font: 400 19px/1.6 Onest, system-ui, sans-serif;
  text-align: center;
  text-wrap: pretty;
}
.doc-meta strong { color: #121212 !important; font-weight: 500; }

/* Три колонки, как у статьи: оглавление — текст — пустое поле справа. */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 3fr);
  gap: 72px;
  align-items: start;
  margin-top: 88px;
}
.doc-layout::after { content: ""; }
.doc-contents { position: sticky; top: 132px; border-bottom: 1px solid #DCDCD6; }

.doc {
  max-width: 640px;
  min-width: 0;
  margin: 88px auto 0;
  overflow-wrap: anywhere;
}
.doc-layout .doc { margin: 0 auto; width: 100%; }
.doc > :first-child { margin-top: 0; }

.doc p, .doc li {
  font: 400 18px/1.75 Literata, Georgia, serif;
  color: #1C1C1C;
}
.doc p { margin: 0 0 24px; }
.doc h2 {
  margin: 88px 0 24px;
  font: 500 30px/1.2 Onest, system-ui, sans-serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
  scroll-margin-top: 130px;
}
.doc h2 .num { margin-inline-end: .3em; color: #55585E; font-variant-numeric: tabular-nums; }
.doc h3 {
  margin: 48px 0 16px;
  font: 500 20px/1.3 Onest, system-ui, sans-serif;
  letter-spacing: -0.015em;
}
.doc a { color: #121212; text-decoration: underline; text-decoration-color: #B9B9B4; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.doc a:hover { text-decoration-color: #121212; }
.doc strong, .doc b { font-weight: 600; }

.doc ul, .doc ol { margin: 0 0 28px; padding: 0; list-style: none; }
.doc ul > li, .doc ol > li { position: relative; padding-left: 28px; }
.doc li + li { margin-top: 10px; }
.doc ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .82em;
  width: 8px;
  height: 1px;
  background: #121212;
}
.doc ol { counter-reset: li; }
.doc ol > li { counter-increment: li; }
.doc ol > li::before {
  content: counter(li, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .35em;
  font: 500 12px/1.4 Onest, system-ui, sans-serif;
  color: #55585E;
}

.callout {
  margin: 40px 0;
  padding: 24px 28px;
  border-radius: 12px;
  background: #ECECE7;
  font: 400 16px/1.65 Onest, system-ui, sans-serif;
  color: #121212;
}
.callout p, .callout li { font: inherit; color: inherit; }
.callout > :last-child { margin-bottom: 0; }

.table-scroll { max-width: 100%; margin: 8px 0 36px; overflow-x: auto; }
.dtab { width: 100%; border-collapse: collapse; border-top: 1px solid #DCDCD6; }
.dtab th, .dtab td {
  padding: 18px 16px 18px 0;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid #DCDCD6;
  font: 400 15px/1.6 Onest, system-ui, sans-serif;
}
.dtab th { color: #55585E; font-size: 13.5px; }
.dtab td:first-child { width: 32%; font-weight: 500; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 56px; }
  .doc-layout::after, .doc-contents { display: none; }
}
@media (max-width: 600px) {
  main.wrap { padding: 56px 20px 112px; }
  .doc-meta { font-size: 17px; margin-top: 28px; }
  .doc p, .doc li { font-size: 17px; }
  .doc h2 { font-size: 25px; margin-top: 64px; }
  /* Узкий экран: строка таблицы — карточка «заголовок сверху, описание под ним»,
     иначе узкая первая колонка рвёт слова по буквам. */
  .dtab thead { display: none; }
  .dtab, .dtab tbody, .dtab tr, .dtab td { display: block; width: auto; }
  .dtab tr { padding: 16px 0; border-bottom: 1px solid #DCDCD6; }
  .dtab td { padding: 0; border: 0; font-size: 15px; overflow-wrap: normal; }
  .dtab td:first-child { width: auto; margin-bottom: 6px; }
}
