/* Reading pages (legal, terms, privacy, l2soq, help, media kit, psoq, transparency): no scene, a
   prose measure, numbered h2 sections and an optional table of contents (js/toc.js). Loaded after
   components.css. The page ground is the plain paper colour. */

/* with a TOC: two columns on wide screens, the TOC sticky beside the text */
.reading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3.5rem; padding-bottom: 4rem; }
@media (min-width: 1000px) {
  .reading.has-toc { grid-template-columns: minmax(12rem, 16rem) minmax(0, 46rem); }
}

/* the prose: element styles apply to unclassed elements that sit directly in the prose or in one
   of its sections, so components inside it (cards, team grids, timelines, sub-navs) keep theirs */
.prose { max-width: 46rem; font-size: var(--t-body); line-height: 1.7; }
.prose > section { padding-top: 0.5rem; margin-bottom: 2.5rem; }
:is(.prose, .prose > section) > h2:not([class]) {
  display: flex; align-items: baseline; gap: 0.8rem; margin: 2.5rem 0 1rem; font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15; font-weight: 800; font-stretch: 108%; text-wrap: balance;
}
.prose > section:first-child > h2:first-child, .prose > h2:first-child { margin-top: 0; }
.sec-no { flex: none; font-family: var(--mono); font-size: var(--t-label); font-weight: 400; letter-spacing: 0.12em; color: var(--accent-ink); }
:is(.prose, .prose > section) > h3:not([class]) { margin: 1.8rem 0 0.6rem; font-size: 1.2rem; line-height: 1.3; }
:is(.prose, .prose > section) > h4:not([class]) { margin: 1.4rem 0 0.4rem; font-size: 1rem; font-family: var(--mono); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
:is(.prose, .prose > section) > :is(p, ul, ol, dl):not([class]) { margin: 0 0 1rem; }
:is(.prose, .prose > section) > :is(ul, ol):not([class]) { padding-left: 1.4rem; }
:is(.prose, .prose > section) > :is(ul, ol):not([class]) > li { margin: 0 0 0.4rem; }
:is(.prose, .prose > section) > :is(ul, ol):not([class]) > li::marker { color: var(--accent-ink); }
:is(.prose, .prose > section) > dl:not([class]) { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0.4rem 1.2rem; }
:is(.prose, .prose > section) > dl:not([class]) > dt { font-weight: 700; }
:is(.prose, .prose > section) > dl:not([class]) > dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) {
  :is(.prose, .prose > section) > dl:not([class]) { grid-template-columns: minmax(0, 1fr); }
  :is(.prose, .prose > section) > dl:not([class]) > dd { margin-bottom: 0.6rem; }
}
:is(.prose, .prose > section) > blockquote:not([class]) { margin: 1.4rem 0; padding: 0.2rem 0 0.2rem 1.1rem; border-left: 2px solid var(--accent); color: var(--ink); font-size: 1.1rem; }
.prose abbr[title] { text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: help; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose strong { color: var(--ink); }
.prose .code { margin: 1rem 0; }

/* 5. table of contents: sticky beside the text on wide screens; on narrow ones a box with two
   columns, then one. js/toc.js marks the section in view with aria-current. */
.toc { font-size: var(--t-small); }
.toc-title { margin: 0 0 0.9rem; font-family: var(--mono); font-size: var(--t-label); font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; }
.toc-group { margin: 0 0 1.2rem; break-inside: avoid; }
.toc-cat { display: block; margin: 0 0 0.35rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.toc a {
  display: block; padding: 0.3rem 0 0.3rem 0.85rem; border-left: 2px solid var(--rule);
  color: var(--muted); text-decoration: none; line-height: 1.35;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); border-left-color: var(--accent); }
@media (min-width: 1000px) {
  .toc { position: sticky; top: calc(var(--head-h, 4rem) + 1.5rem); align-self: start; max-height: calc(100vh - var(--head-h, 4rem) - 3rem); overflow-y: auto; padding-right: 0.5rem; }
}
@media (max-width: 999.98px) {
  .toc { border: 1px solid var(--rule); background: var(--paper-2); padding: 1.1rem 1.25rem; }
  .toc-cols { columns: 2; column-gap: 2rem; }
}
@media (max-width: 560px) {
  .toc-cols { columns: 1; }
  .toc a { padding-block: 0.55rem; }
}
