/* Methods and data sources page (methods.js): a long-form document.
 *
 * Wide screens: contents list on the left (sticky), one text column of about
 * 46em at 15px. Narrow screens (<= 900 px): the contents list sits on top.
 * No cards or tinted boxes; sections are separated by headings and rules.
 * Colours come from the design tokens in styles.css :root.
 */

.methods-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 46em);
  gap: 40px;
  align-items: start;
  color: var(--ink);
}

/* ---------- contents ---------- */

.methods-toc {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
}
.methods-toc .methods-toc-title {
  margin: 0 0 8px;
  padding: 0 0 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.methods-toc ol { margin: 0; padding: 0; list-style: none; }
.methods-toc > ol > li { margin: 0 0 10px; }
.methods-toc-group { display: block; margin: 0 0 2px; color: var(--ink); font-weight: 600; }
.methods-toc li li a {
  display: block;
  padding: 2px 0 2px 10px;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
  text-decoration: none;
}
.methods-toc li li a:hover { color: var(--teal-dark); border-left-color: var(--teal); text-decoration: none; }

/* ---------- text column ---------- */

.methods-body {
  min-width: 0;
  max-width: 46em;
  font-size: 15px;
  line-height: 1.6;
}
.methods-release { margin: 0 0 6px; color: var(--ink-soft); font-size: 13px; }
.methods-intro { margin: 0 0 8px; }
.methods-group { margin-top: 28px; }
.methods-group-title {
  margin: 0 0 4px;
  padding: 0 0 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.methods-section { padding: 14px 0 0; scroll-margin-top: 12px; }
.methods-section h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.methods-section h3 .methods-anchor { color: var(--ink); text-decoration: none; }
.methods-section h3 .methods-anchor:hover { color: var(--teal-dark); text-decoration: underline; }
.methods-section:target h3 .methods-anchor { color: var(--teal-dark); }
.methods-section p { margin: 0 0 10px; overflow-wrap: break-word; }
.methods-section ul { margin: 0 0 10px; padding-left: 1.3em; }
.methods-section li { margin: 0 0 4px; }
.methods-section a { color: var(--teal-dark); }
.methods-cite-text { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .methods-page { display: block; }
  .methods-toc {
    position: static;
    max-height: none;
    margin: 0 0 20px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
  }
  .methods-toc > ol { columns: 2 14em; column-gap: 24px; }
  .methods-toc > ol > li { break-inside: avoid; }
  .methods-body { font-size: 15px; }
}
@media print {
  .methods-page { display: block; }
  .methods-toc { display: none; }
}
