.methodes-category {
  margin: 2lh 0 0.5lh;
  font-size: 1rem;
  font-weight: 600;
}

.methodes-index,
.methodes-toc ul,
.methodes-list,
.methodes-checklist,
.methodes-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.methodes-index a {
  display: grid;
  grid-template-columns: minmax(18ch, 27ch) minmax(0, 1fr) 7ch;
  gap: 2ch;
  padding: 0.25lh 0;
  text-decoration: none;
}

.methodes-index a span {
  overflow-wrap: anywhere;
}

.methodes-duration {
  white-space: nowrap;
}

.methodes-layout {
  display: grid;
  grid-template-columns: minmax(0, 72ch);
  gap: 4ch;
}

.methodes-article {
  min-width: 0;
  overflow-wrap: anywhere;
}

.methodes-summary,
.methodes-minutes {
  margin: 0 0 0.5lh;
  white-space: pre-wrap;
}

.methodes-print {
  margin: 0.5lh 0 1lh;
}

.methodes-heading {
  margin: 2lh 0 0.5lh;
  font-size: 1rem;
  font-weight: 600;
}

.methodes-paragraph,
.methodes-tip,
.methodes-warn {
  margin: 1lh 0;
  white-space: pre-wrap;
}

.methodes-list,
.methodes-checklist,
.methodes-links {
  margin: 1lh 0;
}

.methodes-list li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2ch;
  white-space: pre-wrap;
}

.methodes-steps {
  counter-reset: none;
}

.methodes-marker {
  min-width: 2ch;
}

.methodes-checklist label {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  white-space: pre-wrap;
}

.methodes-checklist input {
  flex: none;
  margin: 0;
}

.methodes-example {
  margin: 1lh 0;
  padding-left: 2ch;
  border-left: 1px solid var(--line);
}

.methodes-example-title {
  margin: 0 0 0.5lh;
  white-space: pre-wrap;
}

.methodes-example-text {
  margin: 0;
  white-space: pre-wrap;
}

.methodes-tip {
  color: var(--accent);
}

.methodes-warn {
  color: var(--danger);
}

.methodes-links li {
  margin: 0.25lh 0;
}

.methodes-uncheck {
  margin: 0.5lh 0;
}

.methodes-toc {
  display: none;
}

@media (min-width: 1100px) {
  .document:has(.methodes-layout) {
    width: min(100% - 4ch, 108ch);
  }

  .methodes-layout {
    grid-template-columns: minmax(0, 72ch) minmax(0, 1fr);
  }

  .methodes-toc {
    display: block;
    position: sticky;
    top: 1lh;
    align-self: start;
    max-height: calc(100dvh - 2lh);
    overflow-y: auto;
    overflow-wrap: anywhere;
  }

  .methodes-toc-title {
    margin: 0 0 0.5lh;
  }

  .methodes-toc li {
    margin: 0.25lh 0;
  }
}

@media (max-width: 599px) {
  .methodes-index a {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 1lh;
  }
}

@media print {
  html,
  body {
    background: white;
    color: black;
  }

  .site-header,
  .document > .back-link,
  .document > div > .back-link,
  .methodes-toc,
  .methodes-print,
  .methodes-uncheck,
  .methodes-article .kit-storage {
    display: none !important;
  }

  .document,
  .document:has(.methodes-layout) {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .methodes-layout {
    display: block;
  }

  .methodes-article,
  .methodes-article .dim,
  .methodes-tip,
  .methodes-warn {
    color: black;
  }

  .methodes-example {
    border-left-color: black;
  }

  .methodes-heading {
    break-after: avoid;
  }

  .methodes-example,
  .methodes-checklist li {
    break-inside: avoid;
  }

  .methodes-article a {
    color: black;
  }
}
