.section-toggle { display: none; }

@media screen and (max-width: 800px) {
  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 14px 16px 0;
  }
  .publication { grid-column: 1 / -1; }
  .views { order: 0; gap: 16px; margin: 0; }
  .views a { min-height: 44px; font-size: .9rem; }
  #save {
    align-self: center; justify-self: end; margin: 0; max-width: 11ch;
    text-align: right; line-height: 1.25; font-size: .74rem;
  }
  .layout { padding: 0; }
  .layout main { padding: 20px clamp(16px, 4.5vw, 34px); }
  .layout aside, .contents {
    position: sticky; top: 0; z-index: 4;
    background: var(--index); border-bottom: 1px solid var(--strong-rule);
    padding: 0 clamp(16px, 4.5vw, 34px); margin: 0;
    max-height: 56vh; max-height: 56dvh;
    overflow-y: auto; overscroll-behavior: contain;
  }
  .layout aside h2 { display: none; }
  .section-toggle, .contents > details > summary {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 46px; margin: 0; padding: 8px 0;
    font: 600 .94rem/1.4 "Work Sans", sans-serif;
    color: var(--pine); background: var(--index); border: 0;
  }
  .section-toggle::after, .contents > details > summary::after {
    content: ''; width: 8px; height: 8px; margin: 0 4px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
  }
  .section-toggle[aria-expanded=true]::after, .contents > details[open] > summary::after { transform: rotate(225deg); }
  .contents > details > summary::-webkit-details-marker { display: none; }
  .section-toggle[aria-expanded=false] + .section-menu { display: none; }
  #sections { display: block; }
  #sections a, #toc summary, #toc a { min-height: 44px; align-content: center; }
  .section-menu .source { margin: 0; padding: 12px 10px 12px 0; }
  .part, .card, .writing { scroll-margin-top: 56px; }
  .document-title { flex-wrap: wrap; gap: 4px 12px; }
  .document-title h1 { font-size: 1.55rem; }
  #print { min-height: 44px; }
  .part h2 { margin-top: 22px; font-size: 1.26rem; }
  .card h3, #heading { font-size: 1.24rem; line-height: 1.35; }
  .card { padding-block: 18px; }
  .writing .card { padding-block: 0; }
  .snapshot-value, .transcript blockquote { font-size: 1.0625rem; line-height: 1.55; }
  .card textarea, .card textarea[id$="-evidence"] { font-size: 1rem; }
  .inline-evidence summary, #note summary { padding: 12px 2px; min-height: 44px; }
  .inline-excerpts { max-height: none; overflow: visible; }
  .transcript .passage-heading { align-items: baseline; gap: 8px; line-height: 1.45; }
  .transcript a.folio { display: inline-grid; min-width: 44px; min-height: 44px; align-items: center; text-align: end; }
  .inline-excerpts .transcript { padding-inline: 0; }
  .inline-excerpts .transcript blockquote { margin-top: 2px; }
  .writing, .reader { padding: 20px clamp(16px, 4.5vw, 34px); }
  #list button { min-height: 48px; }
  #panes { height: clamp(560px, 85dvh, 850px); }
  .panehead { padding: 2px 5px; }
  .panehead button, .tools select { min-height: 44px; }
  .panehead .move { width: 44px; }
  .tools { padding: 0 10px 5px; gap: 0 16px; }
  .tools a { flex: 1 0 100%; display: flex; align-items: center; min-height: 44px; }
  .tools label { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
  #text { padding-inline: 8px; }
  .divider.horizontal:not([aria-disabled=true]) { flex-basis: 24px; }
  footer nav a { padding-block: 8px; }
}
