/* The notes area: /docs and /docs/<slug>.

   Layered on performance.css, which supplies the palette, the header, the
   footer and the band/hero classes -- a note has to read like part of the
   same site, not like a README someone pasted onto it.

   The prose column is capped narrower than the site's 1080px bands: these
   pages are read line by line rather than scanned, and a full-width
   measure is what makes documentation tiring. */

.note {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 22px 24px;
}

.note-head {
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}

.crumb {
  margin: 0 0 14px;
  font-size: 13.5px;
}

.crumb a {
  text-decoration: none;
}

.crumb a:hover {
  text-decoration: underline;
}

.note-head h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4.2vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.note-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- The rendered Markdown ---------- */

.note-body {
  font-size: 16px;
  color: var(--text-primary);
}

.note-body h2 {
  margin: 38px 0 12px;
  font-size: 21px;
  letter-spacing: -0.01em;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.note-body h3 {
  margin: 26px 0 8px;
  font-size: 17px;
}

.note-body p,
.note-body li {
  color: var(--text-secondary);
}

.note-body p {
  margin: 0 0 14px;
}

.note-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.note-body ul,
.note-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.note-body li {
  margin-bottom: 7px;
}

.note-body a {
  color: var(--series-1);
}

/* Tables get their own scroll rather than widening the page. A wide table on
   a phone otherwise pushes the whole document sideways, which is a bug that
   only shows up on a device nobody tests on. */
.note-body table {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14.5px;
}

.note-body th,
.note-body td {
  border-bottom: 1px solid var(--grid);
  padding: 8px 14px 8px 0;
  text-align: left;
  vertical-align: top;
}

.note-body th {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.note-body td {
  color: var(--text-secondary);
}

.note-body thead th {
  border-bottom-color: var(--border);
}

.note-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.note-body pre {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
}

.note-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------- The list ---------- */

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.note-card a {
  display: block;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}

.note-card a:hover {
  border-color: var(--series-1);
}

.note-card h2,
.note-card h3 {
  margin: 0 0 6px;
  font-size: 18.5px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.note-card h3 {
  font-size: 16.5px;
}

.note-status {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.note-list.compact .note-card a {
  padding: 14px 16px;
}

.note-list.compact .note-status {
  margin: 0;
  font-size: 13.5px;
}
