/* Text pages: Changelog and Privacy (Dima, 1 Dec). Built on the home page's tokens from prototype.css.
   Same layout as "And all the small things": a row per section between hairlines, the section's
   name on the left (2 columns, stays in view while you scroll), the text on the right (4 columns). */

/* Header: the small icon on the left goes home; no hero spacing here */
.doc-top { display: flex; align-items: center; padding-top: 24px; }
.doc-top .logo { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); }

.doc-head { margin-top: calc(144px + var(--bar-top) + var(--bar-h)); }   /* the title starts where the icon starts on the home page: 224 from the top (Dima, 1 Dec) */
.doc-head { text-align: center; }   /* title and subtitle centred, like the home page (Dima, 1 Dec) */
.doc-head h1 { margin: 0; text-align: center; font: var(--t-display); letter-spacing: -0.02em; }
.doc-head p { margin: 16px auto 0; max-width: 676px; font: var(--t-caption); color: var(--secondary); }   /* Caption (Dima, 1 Dec; was Lead) */

.doc-rows { margin-top: 72px; border-top: 1px solid var(--hairline); }
.doc-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 var(--gutter); padding: 48px 0; border-bottom: 1px solid var(--hairline); }
.doc-row:last-child { border-bottom: 0; }
.doc-label { grid-column: 1 / span 2; align-self: start; margin: 0; padding-right: 24px; font: var(--t-h3); letter-spacing: -0.005em; }
.doc-label small { display: block; margin-top: 4px; font: var(--t-body); letter-spacing: 0; color: var(--secondary); }
.doc-body { grid-column: 3 / span 4; min-width: 0; font: var(--t-body); }
.doc-body > :first-child { margin-top: 0; }
.doc-body > :last-child { margin-bottom: 0; }
.doc-body p { margin: 0 0 16px; }
.doc-body h3 { margin: 32px 0 8px; font: 600 17px/24px var(--font); }
.doc-body ul { margin: 0 0 16px; padding-left: 20px; }
.doc-body li { margin: 0 0 8px; }
.doc-body li::marker { color: var(--secondary); }
.doc-body a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-decoration-skip-ink: auto; text-underline-offset: 2px; transition: text-decoration-color var(--fade) ease; }   /* the text colour at 30%, 100% on hover; the line breaks around descenders (Dima, 1 Dec). Offset 2: at 3 the line sat below the descenders, so there was nothing to skip */
.doc-body a:hover { text-decoration-color: currentColor; }
.doc-body .quiet { color: var(--secondary); }
.doc-body code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1em; }   /* the same size as the text around it (Dima, 1 Dec; was 15) */

/* Something Dima has to fill in before publishing */
mark.todo { padding: 0 4px; border-radius: 4px; background: #fff1a8; color: #1d1d1f; }

@media (max-width: 760px) {
  .doc-head { margin-top: calc(48px + var(--bar-top) + var(--bar-h)); }   /* 48 under the header on phones */
  .doc-head h1 { font-size: 32px; line-height: 38px; }   /* was 40 / 48 (Dima, 2 Dec: headlines 20% smaller on phones) */
  .doc-row { grid-template-columns: 1fr; padding: 32px 0; }
  .doc-label, .doc-body { grid-column: 1 / -1; }
  .doc-label { position: static; padding: 0 0 16px; }
}

/* Privacy: a sticky list of sections on the left, the text on the right (Dima, 1 Dec).
   Titles sit above their text; no lines between sections (Dima, 1 Dec). */
.doc-split { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 var(--gutter); margin-top: 72px; }
.doc-nav { grid-column: 1 / span 2; align-self: start; position: sticky; top: var(--sticky-top); }   /* stays in view under the header, level with where a section lands (Dima, 1 Dec) */
.doc-nav ul { margin: 0; padding: 0; list-style: none; }
.doc-nav li + li { margin-top: 8px; }
.doc-nav a { font: var(--t-body); color: var(--secondary); text-decoration: none; transition: color var(--fade) ease; }
.doc-nav a:hover, .doc-nav a[aria-current] { color: var(--text); }
.doc-main { grid-column: 3 / span 4; min-width: 0; font: var(--t-body); }
.doc-sec + .doc-sec { margin-top: 64px; }   /* no lines between sections (Dima, 1 Dec); 64 apart, was 48 + line + 48 */
.doc-sec h2 { margin: 0 0 16px; font: var(--t-h3); letter-spacing: -0.005em; }
.doc-sec p { margin: 0 0 16px; }
.doc-sec h3 { margin: 32px 0 8px; font: 600 17px/24px var(--font); }
.doc-sec ul { margin: 0 0 16px; padding-left: 20px; }
.doc-sec li { margin: 0 0 8px; }
.doc-sec li::marker { color: var(--secondary); }
.doc-sec > :last-child { margin-bottom: 0; }
.doc-sec a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-decoration-skip-ink: auto; text-underline-offset: 2px; transition: text-decoration-color var(--fade) ease; }   /* the text colour at 30%, 100% on hover; the line breaks around descenders (Dima, 1 Dec). Offset 2: at 3 the line sat below the descenders, so there was nothing to skip */
.doc-sec a:hover { text-decoration-color: currentColor; }
.doc-sec code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1em; }   /* the same size as the text around it (Dima, 1 Dec; was 15) */
@media (max-width: 760px) {
  .doc-split { grid-template-columns: 1fr; margin-top: 48px; }
  .doc-nav { display: none; }
  .doc-main { grid-column: 1 / -1; }
}
