:root { color-scheme: dark; font-family: system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #292929; color: #f5f5f5; }
.toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 10px 20px; background: #333; box-shadow: 0 1px 6px #0007; }
.toolbar a { color: inherit; text-decoration: none; }
.home { font-size: 24px; }
.document-name { margin-right: auto; font-size: 14px; font-weight: 600; }
.page-controls { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.toolbar button, .toolbar select, .toolbar input { height: 30px; border: 1px solid #666; border-radius: 4px; background: #242424; color: #fff; font: inherit; }
.toolbar button { width: 30px; cursor: pointer; font-size: 21px; }
.toolbar input { width: 44px; text-align: center; appearance: textfield; }
.toolbar input::-webkit-inner-spin-button { appearance: none; }
.toolbar select { max-width: 115px; padding: 0 6px; font-size: 13px; }
.download { font-size: 13px; white-space: nowrap; padding: 6px 9px; border: 1px solid #666; border-radius: 4px; }
.toolbar :focus-visible { outline: 2px solid #00ffff; outline-offset: 3px; }
#viewer { padding: 24px 16px 40px; }
#status, .fallback { text-align: center; padding: 20px; }
.fallback a, #status a { color: #8eeaff; }
.pdf-page { position: relative; margin: 0 auto 24px; background: white; box-shadow: 0 2px 8px #0008; overflow: hidden; scroll-margin-top: 76px; }
.pdf-page canvas { display: block; }
.pdf-links { position: absolute; inset: 0; }
.pdf-link { position: absolute; display: block; outline: 1px solid #00ffff; outline-offset: -0.5px; background: transparent; }
.pdf-link:hover { background: #00ffff16; }
.pdf-link:focus-visible { outline: 2px solid #009fa8; outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .toolbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .document-name { flex: 1; }
  .page-controls { order: 4; margin-left: 30px; }
  #viewer { padding: 16px 8px 24px; }
  .pdf-page { margin-bottom: 16px; scroll-margin-top: 110px; }
}
