/* Scoped to the two presentations that explicitly enable citation controls. */
#sir-cite-panel {
  --muted-meta: #ffffff30;
  --muted-dark: #bbc2c7;
  box-sizing: border-box;
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.5rem 1.8rem;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  background: #11181d;
  color: #f4f4ee;
  font: 400 16px/1.6 var(--sans, sans-serif);
  overflow: auto;
  overscroll-behavior: contain;
  color-scheme: dark;
}
#sir-cite-panel::backdrop { background: #000b; }
#sir-cite-panel:not([open]) { display: none; }
#sir-cite-panel :is(p, h2, h3) { max-width: none; color: inherit; }
#sir-cite-panel p { font-size: 1em; line-height: 1.6; }
#sir-cite-panel h2 { font: 600 1.5em/1.2 var(--sans, sans-serif); margin: 0; letter-spacing: -.025em; }
#sir-cite-panel h3 { font: 600 1.15em/1.3 var(--sans, sans-serif); margin: 0 0 .7em; }
#sir-cite-panel a, .sir-study-reference a { color: var(--accent, #76d7df); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
#sir-cite-panel button { min-height: 44px; padding: .5em .8em; background: transparent; border: 1px solid #ffffff60; border-radius: 6px; color: inherit; font: 500 .85em/1.5 var(--sans, sans-serif); cursor: pointer; }
.sir-cite-header { display: flex; align-items: start; justify-content: space-between; gap: 1em; position: sticky; top: -1.5rem; padding-block: 1rem; margin-top: -1rem; background: #11181d; z-index: 1; }
.sir-cite-header button { flex-shrink: 0; }
#sir-cite-panel .citation-help, #sir-cite-panel .citation-intro { color: #bbc2c7; font-size: .88em; }
#sir-cite-panel .citation-style summary { font-size: .95em; }
#sir-cite-panel .citation-text { font-size: 1em; }
#sir-cite-panel .citation-downloads a { font-size: .9em; }
.sir-cite-presentation { margin-top: 1.5em; padding-top: 1.5em; border-top: 1px solid #ffffff30; }
#sir-cite-panel :is(a, button, summary):focus-visible, .sir-study-reference a:focus-visible { outline: 2px solid var(--accent, #76d7df); outline-offset: 4px; }
#sir-cite-panel .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sir-study-reference { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid #ffffff30; max-width: 78ch; }
.sir-study-reference h2 { font: 600 1.1rem/1.3 var(--sans, sans-serif); margin: 0 0 1rem; }
.sir-reference-entry { padding-left: 1.5em; text-indent: -1.5em; font-size: .9rem; line-height: 1.7; overflow-wrap: anywhere; }
.sir-study-reference .sir-reference-links, .sir-study-reference .sir-reference-scope { font-size: .8rem; line-height: 1.7; }
.sir-reference-links a { display: inline-block; padding-block: .5rem; }
@media (max-width: 700px) {
  #sir-cite-panel { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); padding: 1.1rem; }
  .sir-cite-header { top: -1.1rem; }
  /* The added citation control can make the study navigation wrap to three rows. */
  .slide { scroll-margin-top: 12rem; }
}
@media print { #sir-cite-panel { display: none !important; } .sir-study-reference { break-inside: avoid; } }
