/* ============================================================
   page-content.css — prose of the default page template (page.php):
   public offer, privacy policy, user agreement, API docs.
   Enqueued only on that template (inc/page-content.php).

   The legal texts come from the editor as nested ordered lists:
   ol > li > h2 (section) + ol > li (clause) + ol > li (sub-clause).
   Browser defaults gave them 35px h2 next to a tiny "1.", 16/normal
   clauses with no air, and a different rhythm from the ul items.
   Numbering here is ours (counters): 1. / 1.1. / 1.1.1.
   ============================================================ */

.section.page .content {
  font-size: 16px;
  line-height: 1.6;
  color: #2f3946;
}
.section.page .content > :first-child { margin-top: 0; }

.section.page .content p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.6;
}

.section.page .content h2 {
  margin: 36px 0 14px;
  font-size: 26px;
  line-height: 1.3;
}
.section.page .content h3 {
  margin: 28px 0 10px;
  font-size: 21px;
  line-height: 1.35;
}
.section.page .content h4 {
  margin: 22px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

/* Lists: one rhythm for ul and ol */
.section.page .content ul,
.section.page .content ol {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}
.section.page .content li,
.section.page .content ul > li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 28px;
  font-size: 16px;
  line-height: 1.6;
  list-style: none;
}
.section.page .content li > :is(ul, ol) { margin: 10px 0 0; }

.section.page .content ul > li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18d0cd;
}

/* Numbering 1. / 1.1. / 1.1.1. — counters instead of the browser's per-list restart */
.section.page .content ol { counter-reset: oki-ol; }
.section.page .content ol > li { counter-increment: oki-ol; }
.section.page .content ol > li::before {
  content: counters(oki-ol, ".") ".";
  position: absolute;
  left: 0;
  color: #6080d0;
  font-weight: 700;
}
.section.page .content ol ol > li { padding-left: 44px; }
.section.page .content ol ol ol > li { padding-left: 56px; }

/* A section heading inside a list item: the number sits on the heading line, same size */
.section.page .content ol > li:has(> h2:first-child) { padding-left: 0; margin-top: 30px; }
.section.page .content ol > li:has(> h2:first-child)::before { display: none; }
.section.page .content ol > li > h2:first-child { margin-top: 0; }
.section.page .content ol > li > h2:first-child::before {
  content: counters(oki-ol, ".") ". ";
  color: #6080d0;
}
/* clauses under a section restart at 1 under that section's number */
.section.page .content ol > li:has(> h2:first-child) > ol > li { padding-left: 44px; }

/* Leftover inline weights from the old editor (style="font-weight: 400") must not flatten bold */
.section.page .content :is(b, strong) { font-weight: 700; }

.section.page .content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.section.page .content :is(th, td) {
  padding: 10px 12px;
  border: 1px solid #e3e6eb;
  vertical-align: top;
  text-align: left;
}

@media (max-width: 767px) {
  .section.page .content h2 { margin-top: 28px; font-size: 22px; }
  .section.page .content h3 { font-size: 19px; }
  .section.page .content li,
  .section.page .content ul > li { padding-left: 24px; font-size: 15px; }
  .section.page .content ol ol > li,
  .section.page .content ol > li:has(> h2:first-child) > ol > li { padding-left: 36px; }
  .section.page .content ol ol ol > li { padding-left: 44px; }
  .section.page .content table { display: block; overflow-x: auto; }
}
