/* Read pages: documentation, training, questions, legal text. Load with $page['css'] = ['read', ...].
   One column of text at a line length that reads. From 1024px a list of the sections stays beside it. */
.read { display: grid; gap: var(--s-7) var(--gutter); }
.read__nav ul { display: grid; gap: 2px; }
.read__nav a { display: flex; align-items: center; min-height: 44px; padding: 8px var(--s-3); line-height: 1.35; border-radius: 8px; color: var(--muted); text-decoration: none; }
.read__nav a:hover, .read__nav a[aria-current] { color: var(--ink); background: var(--surface); }
.read__nav > p { font-weight: 500; padding: 0 var(--s-3) var(--s-2); }
/* Under 1024px the list is one row that stays under the site header and scrolls sideways,
   so the text starts on the first screen and each section stays one touch away. */
@media (max-width: 1023px) {
  .read__nav { position: sticky; top: var(--nav); z-index: 5; display: flex; gap: var(--s-1); overflow-x: auto; margin-inline: calc(-1 * var(--gut)); padding: 6px var(--gut); background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .read__nav::-webkit-scrollbar { display: none; }
  .read__nav > p { display: none; }
  .read__nav ul { display: flex; gap: var(--s-1); }
  .read__nav li { flex: none; }
  /* the row uses the pill tab of the site: a hairline pill, and the current one in ink */
  .read__nav a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding-inline: var(--s-4); }
  .read__nav a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
}
@media (min-width: 1024px) {
  .read { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .read__nav { position: sticky; top: calc(var(--nav) + var(--s-5)); max-height: calc(100vh - var(--nav) - var(--s-7)); overflow: auto; }
}
/* From 1024px a row of the list is 34px tall, so a list of 16 links and 4 labels fits a 900px screen.
   On a touch screen a row keeps its 44px. */
@media (min-width: 1024px) { .read__nav a { min-height: 34px; padding-block: 6px; } }
@media (min-width: 1024px) and (pointer: coarse) { .read__nav a { min-height: 44px; } }
/* running text */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose :is(h2, h3) { scroll-margin-top: calc(var(--nav) + var(--s-5)); }
/* a section head is clearly larger than a head inside the section, and a rule separates the sections */
.prose h2 { font-size: clamp(26px, 1vw + 22px, 32px); line-height: 1.2; margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.prose > h2:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin-top: var(--s-6); }
.prose :is(ul, ol) { padding-left: 1.3em; display: grid; gap: var(--s-2); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:not(.btn):hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; }
.prose :is(th, td) { padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-weight: 400; }
.prose thead th { font-weight: 500; border-bottom-color: var(--line-strong); }
.read-meta { color: var(--muted); }
