/* Documents on faxo.com (terms, privacy, child safety, contact…): layouts/site_doc.html.erb.
   Reading type on faxo.css's colors (light and dark); everything scoped to .fx-doc, so the old
   pages' markup (sections, tables, inline widths, old classes) reads cleanly without edits. */

.fx-doc-page { background: var(--bg); }
.fx-doc {
  padding: 28px 0 40px;
  color: var(--label);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.fx-doc > * > header, .fx-doc header { margin: 0; }
.fx-doc h1 {
  font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em;
  margin: 0 0 20px;
}
.fx-doc h2 {
  font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em;
  margin: 32px 0 10px;
}
.fx-doc h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.fx-doc p, .fx-doc ul, .fx-doc ol, .fx-doc section { margin: 0 0 14px; }
.fx-doc section > h2:first-child { margin-top: 28px; }
.fx-doc ul, .fx-doc ol { padding-left: 22px; }
.fx-doc li { margin: 4px 0; }
.fx-doc a { color: var(--accent); text-decoration: none; }
.fx-doc a:hover { text-decoration: underline; }
.fx-doc strong, .fx-doc b { font-weight: 600; }
.fx-doc hr { border: 0; border-top: 0.5px solid var(--separator); margin: 28px 0; }

/* old terms: bullet words laid out in a table inside a <ul>: flow them as an even grid */
.fx-doc ul > table, .fx-doc ul > table > tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 16px; border: 0; margin: 4px 0 8px; }
.fx-doc ul > table > tbody { grid-column: 1 / -1; }
.fx-doc ul > table tr { display: contents; }
.fx-doc ul > table td { display: list-item; list-style: disc; padding: 2px 0; border: 0; font-size: 17px; }
.fx-doc ul > table td > li { display: inline; }
.fx-doc ul > table td:not(:has(li)) { display: none; } /* empty cells padding a row */

/* old markup: fixed widths, centered blocks, old frameworks' boxes */
.fx-doc table { width: 100% !important; max-width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; }
.fx-doc td, .fx-doc th { padding: 8px 10px; border-bottom: 0.5px solid var(--separator); text-align: left; vertical-align: top; }
.fx-doc [style*="width"] { max-width: 100%; }
.fx-doc div, .fx-doc .center, .fx-doc .jumbotron, .fx-doc .itemaxw {
  margin-left: 0 !important; margin-right: 0 !important; text-align: left !important;
  background: none !important; padding-left: 0 !important; padding-right: 0 !important;
}
.fx-doc img { max-width: 100%; height: auto; }

/* the first block under the title reads as an intro */
.fx-doc h1 + h2 { font-size: 15px; font-weight: 500; color: var(--secondary); margin-top: -12px; }

.fx-doc-foot { border-top: 0.5px solid var(--separator); padding: 20px 0 calc(28px + env(safe-area-inset-bottom)); }
.fx-doc-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.fx-doc-foot a { color: var(--secondary); text-decoration: none; }
.fx-doc-foot a:hover, .fx-doc-foot a[aria-current="page"] { color: var(--label); }
.fx-doc-foot span { color: var(--tertiary); margin-left: auto; }

@media (max-width: 520px) {
  .fx-doc { font-size: 16px; padding-top: 20px; }
  .fx-doc h1 { font-size: 28px; }
  .fx-doc h2 { font-size: 20px; }
  .fx-doc-foot span { margin-left: 0; width: 100%; }
}
