body.sqa-reader-page { margin:0; overflow:hidden; background:#29292d; color:#143b2e; }
.sqa-reader-shell { position:relative; height:100vh; height:100dvh; width:100%; min-width:0; background:#29292d; }
.admin-bar .sqa-reader-shell { height:calc(100dvh - 32px); }
#sqa-pdf-viewer { display:block; width:100%; height:100%; border:0; background:#525659; }
.sqa-reader-menu { position:absolute; bottom:max(18px,env(safe-area-inset-bottom)); right:max(18px,env(safe-area-inset-right)); z-index:20; font-family:system-ui,sans-serif; }
.sqa-reader-menu > summary { display:flex; align-items:center; justify-content:center; gap:9px; width:max-content; margin-left:auto; padding:12px 18px; min-height:46px; box-sizing:border-box; list-style:none; border:1px solid #c4a466; border-radius:28px; background:#123e30; color:#fff; box-shadow:0 5px 24px #0005; cursor:pointer; font-size:14px; font-weight:600; user-select:none; }
.sqa-reader-menu > summary::-webkit-details-marker { display:none; }
.sqa-reader-menu > summary > span:first-child { font-size:21px; line-height:1; }
.sqa-reader-menu[open] > summary { background:#205541; }
.sqa-reader-panel { position:absolute; bottom:58px; right:0; width:420px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 110px); overflow:auto; overscroll-behavior:contain; border:1px solid #c7d3cc; border-radius:18px; background:#faf9f4; box-shadow:0 15px 55px #0005; }
.sqa-reader-header { position:relative; padding:18px; background:#123e30; color:#fff; }
.sqa-reader-header h1 { margin:8px 28px 14px 0; font-size:19px; color:inherit; line-height:1.3; }
.sqa-reader-header a { color:inherit; font-size:12px; }
.sqa-reader-header nav { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.sqa-reader-shell button, .sqa-reader-shell input, .sqa-reader-shell select { box-sizing:border-box; font:inherit; border:1px solid #bdcdc3; border-radius:9px; padding:9px 10px; min-height:42px; background:#fff; color:#143b2e; }
.sqa-reader-shell button { cursor:pointer; font-size:13px; }
.sqa-reader-shell button:disabled { cursor:wait; opacity:.5; }
.sqa-reader-shell :is(a,button,input,select,summary):focus-visible { outline:3px solid #be9854; outline-offset:3px; }
#sqa-reader-menu-close { position:absolute; top:10px; right:10px; width:36px; min-height:36px; padding:0; border:0; background:#ffffff18; color:#fff; font-size:25px; }
.sqa-reader-navigation { padding:18px; }
.sqa-reader-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sqa-reader-fields label { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px; font-weight:600; }
.sqa-reader-search { grid-column:1 / -1; }
.sqa-reader-fields :is(select,input) { width:100%; min-width:0; font-size:16px; }
.sqa-reader-controls { display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding-top:14px; margin-top:14px; border-top:1px solid #dae2db; }
.sqa-reader-controls form { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0; width:100%; order:-1; font-size:13px; }
#sqa-page-input { width:72px; font-size:16px; }
.sqa-reader-note { margin:14px 0 0; font-size:11px; line-height:1.6; color:#53675c; }
#sqa-reader-status { display:block; margin-top:5px; font-weight:700; }
#sqa-navigation-results { max-height:200px; overflow:auto; margin:8px 0; padding:0; list-style:none; }
#sqa-navigation-results[hidden] { display:none; }
#sqa-navigation-results button { display:block; width:100%; text-align:start; margin:4px 0; }
@media(max-width:600px) {
 .sqa-reader-menu { bottom:max(12px,env(safe-area-inset-bottom)); right:12px; }
 .sqa-reader-panel { width:calc(100vw - 24px); bottom:58px; max-height:calc(100dvh - 100px); }
 .sqa-reader-navigation,.sqa-reader-header { padding:14px; }
}
@media(max-width:782px) { .admin-bar .sqa-reader-shell { height:calc(100dvh - 46px); } .admin-bar .sqa-reader-panel { max-height:calc(100dvh - 150px); } }

/* Compact, consistent controls independent of the main site's form styles. */
.sqa-reader-panel { width:360px; border-radius:16px; }
.sqa-reader-panel [hidden] { display:none !important; }
.sqa-reader-header { padding:18px 20px 14px; }
.sqa-reader-header h1 { font-family:system-ui,sans-serif; font-size:18px; font-weight:650; margin:10px 30px 0 0; }
.sqa-reader-header a { text-decoration:none; opacity:.8; }
.sqa-reader-navigation { padding:18px 20px; }
.sqa-reader-shell :is(button,input,select) { margin:0; box-shadow:none; letter-spacing:normal; text-transform:none; line-height:1.3; }
.sqa-reader-shell button { transition:background .15s; }
.sqa-reader-shell button:hover { background:#eaf0ec; }
.sqa-reader-fields { gap:12px; }
.sqa-reader-fields label { font-weight:500; font-size:12px; }
.sqa-reader-fields :is(input,select) { font-size:16px; font-weight:400; }
.sqa-reader-controls { display:grid; gap:8px; }
.sqa-control-label { font-size:10px; font-weight:700; letter-spacing:1.2px; color:#64776c; margin-top:4px; }
.sqa-page-row { display:flex; align-items:center; gap:6px; }
.sqa-page-row > button { width:38px; flex-shrink:0; padding:6px; }
.sqa-reader-controls form { display:flex; flex-wrap:nowrap; width:auto; flex:1; order:initial; min-width:0; gap:5px; }
#sqa-page-input { width:55px; flex:1; min-width:40px; padding:8px 4px; text-align:center; }
#sqa-page-total { font-size:12px; white-space:nowrap; color:#64776c; }
.sqa-zoom-row { display:grid; grid-template-columns:38px 38px 1fr 1fr; gap:6px; }
.sqa-zoom-row button { padding:8px 4px; }
#sqa-text-find { width:100%; text-align:center; }
.sqa-reader-note { font-size:11px; margin:12px 0 8px; }
#sqa-reader-status { font-size:11px; font-weight:500; color:#64776c; }
.sqa-reader-navigation nav { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:14px; padding-top:12px; border-top:1px solid #dae2db; }
.sqa-reader-navigation nav a { color:#205541; font-size:12px; text-decoration:none; }
.sqa-reader-navigation nav button { font-size:12px; min-height:36px; }
#sqa-reader-menu-close:hover { background:#ffffff30; }
@media(max-width:600px) {
 .sqa-reader-panel { width:calc(100vw - 24px); }
 .sqa-reader-navigation { padding:16px; }
 .sqa-reader-header { padding:16px; }
}

/* Reader interaction palette and consistent icon geometry. */
.sqa-reader-shell { --reader-ink:#163f32; --reader-hover:#e7f0e9; --reader-active:#d5e5da; }
.sqa-reader-shell button { display:inline-flex; align-items:center; justify-content:center; gap:6px; font-weight:600; touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:background-color .16s,border-color .16s,box-shadow .16s; }
.sqa-reader-shell svg { width:20px; height:20px; flex-shrink:0; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; }
.sqa-reader-header a { display:inline-flex; align-items:center; gap:4px; opacity:1; }
.sqa-reader-header a svg { width:15px; height:15px; }
.sqa-reader-shell button:not(:disabled):active { background:var(--reader-active); border-color:#6b917a; }
.sqa-reader-shell button:disabled { cursor:not-allowed; opacity:.4; }
.sqa-reader-menu > summary { touch-action:manipulation; font-size:14px; letter-spacing:0; text-transform:none; transition:background-color .16s,box-shadow .16s; }
.sqa-reader-menu > summary:active { background:#286048; }
#sqa-reader-menu-close { min-width:36px; }
#sqa-reader-menu-close:active { background:#ffffff38; }
.sqa-reader-navigation nav a { display:inline-flex; align-items:center; min-height:40px; padding:4px; border-radius:5px; font-weight:600; }
.sqa-reader-navigation nav a:hover { color:#0b2c20; background:#e7f0e9; }
.sqa-reader-shell :is(input,select):focus { border-color:#638771; }
.sqa-reader-shell :is(input,select,button,summary,a):focus-visible { outline:3px solid #ae8038; outline-offset:3px; }
.sqa-page-row > button,.sqa-zoom-row > button { min-height:44px; }
#sqa-page-form button { background:#164c37; border-color:#164c37; color:#fff; }
#sqa-page-form button:hover { background:#236346; }
#sqa-page-form button:active { background:#0c3323; }
#sqa-navigation-results button { justify-content:flex-start; text-align:start; font-weight:500; }
@media(hover:hover) { .sqa-reader-menu > summary:hover { background:#21563e; box-shadow:0 5px 26px #0006; } }
@media(prefers-reduced-motion:reduce) { .sqa-reader-shell * { transition:none!important; scroll-behavior:auto!important; } }

.sqa-reader-shell, .sqa-reader-shell * { box-sizing:border-box; }
