.document-explorer {
  overflow: hidden;
  border-radius: .5rem;
  background: #fbfaf6;
  color: #263a30;
}
.document-explorer [hidden] { display: none !important; }
.document-explorer .document-heading {
  margin: 0;
  padding: 1.05rem clamp(1rem, 3vw, 1.65rem);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
}
.document-image { position: relative; }
.document-explorer .document-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
}
.document-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.document-pin {
  position: absolute;
  top: var(--pin-y);
  left: var(--pin-x);
  transform: translate(-50%, -50%);
  padding: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: transparent;
  pointer-events: auto;
}
.document-pin span,
.document-key {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font: 700 .875rem/1 var(--sans, sans-serif);
}
.document-pin span {
  width: 1.55rem;
  height: 1.55rem;
  background: #fffdf4;
  color: #203d2f;
  border: 1.5px solid #314e3e;
  box-shadow: 0 1px 3px #142e3066;
}
.document-pin[aria-pressed="true"] span {
  background: #204531;
  color: #fff;
  border-color: #fff;
  outline: 2px solid #204531;
}
.document-tools,
.document-reading { padding-inline: clamp(1rem, 3vw, 1.65rem); }
.document-tools { display: flex; justify-content: end; }
.document-enlarge,
.document-references a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #254e38;
  text-decoration: underline;
  text-underline-offset: .18em;
  font-size: .94rem;
}
.document-reading { padding-bottom: 1rem; }
.document-choices {
  display: flex;
  align-items: stretch;
  gap: .45rem;
  flex-wrap: wrap;
}
.document-choice {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .48rem .85rem;
  font: 600 .95rem/1.35 var(--sans, sans-serif);
  text-align: start;
  color: #254b36;
  background: #fffdf7;
  border: 1px solid #858f80;
  border-radius: .35rem;
  cursor: pointer;
}
.document-choice[aria-pressed="true"] {
  color: #fff;
  background: #264c38;
  border-color: #264c38;
}
.document-key {
  border: 1px solid currentColor;
  width: 1.35em;
  height: 1.35em;
  flex: none;
}
.document-note {
  margin-top: .9rem;
  padding: .25rem 0 .1rem .9rem;
  border-inline-start: 3px solid #a7ad8c;
}
.document-note h4 { margin: 0 0 .4rem; font-size: 1.12rem; line-height: 1.3; }
.document-note p { font-size: 1rem; line-height: 1.6; margin-block: 0; }
.document-references { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-top: .35rem; }
.document-explorer :is(button, a):focus-visible {
  outline: 3px solid #945612;
  outline-offset: 3px;
}
.document-pin:focus-visible { border-radius: 50%; background: #fffdf7b3; }
@media (max-width: 36rem) {
  .document-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.4rem), 1fr)); }
  .document-references { display: grid; justify-items: start; }
}
@media print {
  .document-explorer [data-reading-panel][hidden] { display: block !important; }
  .document-tools, .document-choices, .document-pins { display: none !important; }
}

.document-context {
  margin-block: 1.35rem 2rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  background: #edf2e9;
  border-inline-start: 3px solid #53765e;
}
.document-context h3 { margin: 0 0 .75rem; font-size: clamp(1.28rem, 3vw, 1.55rem); }
.document-context figure { margin: 0 0 .85rem; }
.document-context img { display: block; width: 100%; height: auto; }
.document-context figcaption, .document-context .document-origin { font-size: .875rem; line-height: 1.5; }
.document-context figcaption { margin-block-start: .4rem; }
.document-context p { margin: .55rem 0 0; }
.document-context details { margin-top: .4rem; }
.document-context summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .18em;
  color: #204633;
  font-weight: 650;
}
.document-context :is(summary, a):focus-visible { outline: 3px solid #835411; outline-offset: 3px; }
.document-context .document-references a { display: inline-flex; min-height: 44px; align-items: center; }
