/* Produkt — the documents (terms, personal data, requisites).
   The landing's tokens, nav and footer, with a reading layout of its own, after the
   design's «Static — Условия использования»: the list of documents on the left, the text
   in a 660 column, what is on the page on the right; on a phone, one column and the list
   folded into a picker. Type: 12 · 16 · 21 · 38, lines in fours. */

html.doc { scroll-padding-top: 88px; }
.doc .top { border-bottom: 1px solid var(--edge); }

.doc-body { display: grid; gap: 24px; max-width: 1440px; margin: 0 auto; padding: 24px var(--g) 96px; }
.doc-group { font: 600 .75rem/1.3333 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: var(--text-4); }

/* the documents: a picker on a phone, a list beside the text on a wide screen */
.doc-side__full { display: none; }
.doc-pick { border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); }
.doc-pick summary { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; padding: 10px 16px; cursor: pointer; list-style: none; }
.doc-pick summary::-webkit-details-marker { display: none; }
.doc-pick__now { grid-row: 2; font: 500 1rem/1.5 var(--sans); }
.doc-pick summary svg { grid-row: 1 / 3; grid-column: 2; align-self: center; width: 1rem; height: 1rem; color: var(--text-3); transition: transform .25s var(--ease); }
.doc-pick[open] summary svg { transform: rotate(180deg); }
.doc-pick .doc-nav { padding: 0 6px 6px; }
.doc-nav { display: flex; flex-direction: column; gap: 2px; }
.doc-nav a { display: flex; align-items: center; min-height: 36px; padding: 0 12px 1px; border-radius: 8px; font: 500 1rem/1.5 var(--sans); color: var(--text-3); transition: color .2s, background-color .2s; }
.doc-nav a:hover { color: var(--text); }
.doc-nav a[aria-current="page"] { background: var(--control); color: var(--text); }

/* the text */
.doc-main { min-width: 0; }
.doc-main article { display: flex; flex-direction: column; gap: 16px; }
.doc-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 .75rem/1.3333 var(--sans); letter-spacing: .02em; color: var(--text-3); }
.doc-title { padding-top: 8px; font: 700 1.75rem/1.1429 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.doc-meta { font: 500 .75rem/1.3333 var(--sans); letter-spacing: .02em; color: var(--text-3); }
.doc-lead { padding-top: 16px; font: 400 1.125rem/1.5556 var(--sans); color: var(--text); text-wrap: pretty; }
.doc-sec { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 88px; }
.doc-sec h2 { padding-top: 24px; font: 600 1.3125rem/1.3333 var(--sans); letter-spacing: -.005em; }
.doc-sec p, .doc-list { font: 400 1rem/1.75 var(--sans); color: var(--text-2); text-wrap: pretty; }
.doc-sec a { color: var(--text); text-decoration: underline; text-decoration-color: var(--outline); text-underline-offset: .1875rem; transition: text-decoration-color .2s; }
.doc-sec a:hover { text-decoration-color: currentColor; }
.doc-list { display: flex; flex-direction: column; gap: 16px; }
.doc-list li { position: relative; padding-left: 28px; }
.doc-list li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 4px; height: 4px; border-radius: 2px; background: var(--blue-ink); }
.callout { display: flex; gap: 12px; padding: 16px 20px 16px 16px; border-radius: 12px; background: var(--surface); }
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--blue-ink); }
.callout p { font: 500 1rem/1.5 var(--sans); }
.facts { display: flex; flex-direction: column; margin: 0; border-top: 1px solid var(--edge); }
.facts div { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--edge); }
.facts dt { font: 500 .75rem/1.3333 var(--sans); letter-spacing: .02em; color: var(--text-3); }
.facts dd { margin: 0; font: 500 1rem/1.5 var(--sans); color: var(--text); }
.ph { color: var(--text-3); font-style: normal; }     /* still to be filled in */

/* the next and the previous document */
.pager { display: grid; gap: 16px; padding-top: 48px; }
.pager__card { display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1px solid var(--edge); border-radius: 16px; transition: border-color .2s, background-color .2s; }
.pager__card:hover { border-color: var(--outline); background: rgba(255, 255, 255, .02); }
.pager__card--next { align-items: flex-end; text-align: right; }
.pager__label { display: inline-flex; align-items: center; gap: 6px; font: 500 .75rem/1.3333 var(--sans); letter-spacing: .02em; color: var(--text-3); }
.pager__label svg { width: 12px; height: 12px; }
.pager__title { font: 600 1rem/1.5 var(--sans); }

.doc-toc { display: none; }
.doc-foot { border-top: 1px solid var(--edge); }

@media (min-width: 640px) {
  .doc-title { font-size: 2.375rem; line-height: 1.1579; }
  .doc-lead { font-size: 1.3125rem; line-height: 1.5238; }
  .pager { grid-template-columns: 1fr 1fr; }
  .facts div { grid-template-columns: 220px 1fr; align-items: baseline; gap: 24px; }
}

/* a wide screen: the design's three columns, 270 · 660 · 204, the side ones staying put */
@media (min-width: 1024px) {
  html.doc { scroll-padding-top: 104px; }
  .doc .nav__in { position: relative; height: 72px; max-width: 1440px; margin: 0 auto; padding: 0 48px; }
  .doc .nav__links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); gap: 2rem; }
  .doc .nav__links a:not(.btn) { font-size: .875rem; line-height: 1.4286; color: var(--text-2); }
  .doc .nav__links a:not(.btn):hover { color: var(--text); }
  .doc .nav .btn--md { height: 2.5rem; padding: 0 1.125rem; font-size: .875rem; line-height: 1.4286; }
  .doc .nav__trial { display: inline-flex; }

  .doc-body { grid-template-columns: 270px minmax(0, 660px) 204px; justify-content: space-between; gap: 0; padding: 64px 48px 128px; }
  .doc-pick { display: none; }
  .doc-side__full { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 136px; align-self: start; }
  .doc-side__full .doc-group { padding: 0 12px 8px; }
  .doc-side__full .doc-nav a { padding-right: 0; white-space: nowrap; } /* the design's 270 column, the longest title just fits */
  .doc-sec { scroll-margin-top: 104px; }
  .doc-toc { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 136px; align-self: start; }
  .doc-toc .doc-group { padding-bottom: 8px; }
  .doc-toc ul { display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--edge); }
  .doc-toc a { display: block; margin-left: -1px; padding: 6px 0 6px 12px; border-left: 1px solid transparent; font: 500 .75rem/1.3333 var(--sans); letter-spacing: .02em; color: var(--text-3); transition: color .2s, border-color .2s; }
  .doc-toc a:hover { color: var(--text-2); }
  .doc-toc a.is-on { color: var(--text); border-left-color: var(--text); }

  .doc-foot { padding: 24px 48px 32px; }
  .doc-foot .foot__in { flex-direction: row; justify-content: space-between; align-items: center; max-width: 1344px; color: var(--text-4); }
  .doc-foot .foot__legal { flex-direction: row; gap: 24px; padding: 0; }
  .doc-foot .foot__motto { display: none; }
}
.foot a[aria-current="page"] { color: var(--text-2); }

/* the agreement's clauses: the number in the margin's colour, a term said first in the text's */
.clause__n { margin-right: .5em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-3); }
.doc-sec b { font-weight: 600; color: var(--text); }
