/* The legal pages, on top of kit.css: the document layout only. */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.doc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc a:hover,
.doc a:focus-visible {
  text-decoration-color: var(--gold);
}

/* the middle column holds the text; the hero spans the edges on the same columns */
.doc {
  flex: 1;
  display: grid;
  --doc-cols: 1fr min(820px, 100% - 2 * var(--gutter)) 1fr;
  grid-template-columns: var(--doc-cols);
  align-content: start;
  padding-bottom: 72px;
}

.doc > * {
  grid-column: 2;
  min-width: 0;
}

.doc > .doc-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--doc-cols);
  row-gap: 16px;
  padding: 64px 0 56px;
  background: var(--warm);
}

.doc-hero > * {
  grid-column: 2;
}

.lang-switch {
  font-size: 15px;
  color: var(--muted);
}

.doc .lang-switch a {
  color: inherit;
  text-decoration: none;
}

.lang-switch [aria-current] {
  color: var(--ink);
}

.doc-title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.doc-meta {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}

.doc-version {
  font-variant-numeric: tabular-nums;
}

.doc-summary h2,
.doc-toc h2,
.doc-changes h2 {
  margin: 0;
  padding: 28px 0 12px;
  font-weight: 300;
  font-size: 28px;
  line-height: 1.2;
}

.doc-summary ul {
  margin: 0;
  padding: 20px 24px 20px 44px;
  border-radius: 12px;
  background: var(--warm);
  font-size: 17px;
  line-height: 1.55;
}

.doc-summary li + li {
  margin-top: 10px;
}

.doc-toc ol,
.doc-section,
.doc-log {
  border-radius: 12px;
  background: var(--block);
}

.doc-toc ol {
  margin: 0;
  padding: 18px 24px 18px 48px;
  font-size: 15px;
}

.doc-toc li {
  padding: 3px 0;
}

.doc-section {
  margin-top: 12px;
  padding: 22px 24px 10px;
}

.doc-section h2 {
  margin: 0 0 12px;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
}

.doc-section h2 .num {
  margin-right: 6px;
  color: var(--muted);
}

.doc-section p,
.doc-section ul,
.doc-section ol {
  margin: 0 0 14px;
}

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
}

.doc-section li + li {
  margin-top: 6px;
}

.doc-table-wrap {
  margin: 8px 0 18px;
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.doc-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.doc-table th,
.doc-table td {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.doc-table thead th {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.doc-table tbody tr:last-child td {
  border-bottom: 0;
}

.doc-operator {
  margin: 16px 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--page);
  font-style: normal;
  line-height: 1.55;
}

.doc-operator strong {
  display: block;
  font-weight: 500;
  font-size: 18px;
}

.doc-operator .note {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.doc-changes {
  margin-top: 16px;
}

.doc-log {
  margin: 0;
  padding: 6px 24px;
  list-style: none;
  font-size: 15px;
}

.doc-log li {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.doc-log li:first-child {
  border-top: 0;
}

.doc-log time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 721px) {
  body {
    font-size: 17px;
  }

  .doc-toc ol {
    columns: 2;
    column-gap: 32px;
  }

  .doc-toc li {
    break-inside: avoid;
  }
}

/* on phones each table row stacks and labels its cells from data-label */
@media (max-width: 620px) {
  .doc > .doc-hero {
    padding: 40px 0 36px;
  }

  .doc-section,
  .doc-log {
    padding-left: 18px;
    padding-right: 18px;
  }

  .doc-table,
  .doc-table tbody,
  .doc-table tr,
  .doc-table td {
    display: block;
    width: 100%;
  }

  .doc-table caption {
    display: block;
    padding: 4px 0 2px;
  }

  .doc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .doc-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .doc-table tbody tr:last-child {
    border-bottom: 0;
  }

  .doc-table td {
    border: 0;
    padding: 4px 0;
  }

  .doc-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    color: var(--muted);
  }

  .doc-log li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media print {
  body {
    display: block;
    background: Canvas;
    color: CanvasText;
    font-size: 11pt;
  }

  nav.top .links,
  nav.top .right,
  .doc-toc,
  footer {
    display: none;
  }

  nav.top {
    position: static;
    border: 0;
  }

  .doc > .doc-hero,
  .doc-summary ul,
  .doc-section,
  .doc-log {
    background: none;
  }

  .doc-summary ul,
  .doc-operator {
    border: 1px solid CanvasText;
  }

  .doc a {
    color: CanvasText;
  }
}
