:root { color-scheme:light; --reader-surface:#f9f6f1; --reader-text:#1f2430; --reader-muted:#63636b; --reader-line:#ddd7cf; --reader-accent:#4e2a84; --reader-hover:#eee8f4; --reader-canvas:#eeebe6; --reader-teal:#006d70; }
* { box-sizing:border-box; }
html,body { height:100%; margin:0; overflow:hidden; font:14px/1.4 Inter,system-ui,sans-serif; color:var(--reader-text); background:var(--reader-canvas); }
body { display:flex; flex-direction:column; }
body[data-theme="dark"] { color-scheme:dark; --reader-surface:#232936; --reader-text:#f9f6f1; --reader-muted:#bfc1c9; --reader-line:#454d5d; --reader-accent:#b8a7ea; --reader-hover:#343044; --reader-canvas:#151923; --reader-teal:#4cc7c1; }
[hidden] { display:none!important; }
.reader-icons { position:absolute; width:0; height:0; overflow:hidden; }
.reader-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; }
svg { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.reader-toolbar { flex:none; position:relative; z-index:10; background:var(--reader-surface); border-bottom:1px solid var(--reader-line); box-shadow:0 2px 14px #1f243006; }
.reader-header { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:78px; padding:16px 28px; }
.reader-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.reader-brand__mark { display:grid; place-items:center; width:40px; height:44px; border:1px solid var(--reader-line); border-radius:11px; color:var(--reader-accent); background:var(--reader-hover); flex:none; }
.reader-brand__mark svg { width:22px; height:22px; }
.reader-brand__copy { min-width:0; }
.reader-brand__name { font-size:11px; font-weight:700; color:var(--reader-teal); letter-spacing:.025em; }
.reader-brand__name span { color:var(--reader-accent); }
#document-title { font-size:15px; font-weight:650; line-height:1.5; margin:2px 0 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:8px 12px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--reader-text); font:inherit; font-weight:550; cursor:pointer; white-space:nowrap; }
.reader-button:hover:not(:disabled),.reader-button[aria-expanded="true"] { background:var(--reader-hover); color:var(--reader-accent); }
.reader-button:disabled { opacity:.4; cursor:default; }
.reader-readonly { display:inline-flex; align-items:center; font-size:12px; font-weight:650; color:var(--reader-muted); white-space:nowrap; }
.reader-button--primary { flex:none; padding:9px 17px; border-radius:999px; background:#4e2a84; color:#fff; border-color:#4e2a84; }
.reader-button--primary:hover:not(:disabled) { background:#432275; color:#fff; border-color:#432275; }
.reader-button--icon { width:36px; padding:6px; }
.reader-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; padding:8px 28px; border-top:1px solid var(--reader-line); }
.reader-controls__centre,.reader-control-group,.reader-controls__tools,.reader-page-label { display:flex; align-items:center; gap:4px; }
.reader-controls__centre { gap:14px; }
.reader-control-group { border:1px solid var(--reader-line); border-radius:10px; background:var(--reader-surface); }
.reader-control-group .reader-button { border:0; }
.reader-page-label { gap:7px; color:var(--reader-muted); font-size:12px; }
#page-count { white-space:nowrap; }
.reader-divider { width:1px; height:20px; background:var(--reader-line); }
.reader-zoom-step { font-size:19px; font-weight:400; }
.reader-toolbar input,.reader-toolbar select { height:36px; border:0; border-radius:7px; padding:5px 7px; color:var(--reader-text); background:transparent; font:inherit; }
.reader-toolbar select { width:105px; font-size:12px; cursor:pointer; }
#page-number { width:38px; text-align:center; appearance:textfield; -moz-appearance:textfield; font-weight:650; }
#page-number::-webkit-inner-spin-button,#page-number::-webkit-outer-spin-button { appearance:none; margin:0; }
.reader-tools { position:relative; }
.reader-tools__panel { position:absolute; top:calc(100% + 10px); right:0; width:195px; padding:6px; border:1px solid var(--reader-line); border-radius:13px; background:var(--reader-surface); box-shadow:0 12px 30px #0002; }
.reader-tools__panel .reader-button { width:100%; justify-content:flex-start; min-height:42px; }
.reader-search { display:flex; align-items:center; gap:4px; padding:10px 28px; border-top:1px solid var(--reader-line); }
.reader-search label { display:flex; align-items:center; flex:1; min-width:100px; max-width:420px; gap:8px; padding:0 10px; border:1px solid var(--reader-line); border-radius:9px; background:var(--reader-canvas); color:var(--reader-muted); }
#find { min-width:0; width:100%; }
#matches { min-width:70px; font-size:12px; color:var(--reader-muted); text-align:center; }
.reader-toolbar :focus-visible,#viewer-container:focus-visible,#thumbnails button:focus-visible { outline:2px solid var(--reader-accent); outline-offset:3px; }
#reader-main { flex:1; min-height:0; position:relative; }
#viewer-container { position:absolute; inset:20px 0 16px; overflow:auto; scrollbar-color:var(--reader-line) transparent; }
#pdf-viewer { opacity:0; }
body[data-ready="true"] #pdf-viewer { opacity:1; }
.pdfViewer .page { border-image:none; border:0; margin:0 auto 20px; box-shadow:0 2px 4px #1f24300a,0 12px 32px #1f243018; }
#thumbnails { position:absolute; inset:0 auto 0 0; z-index:5; width:184px; overflow:auto; background:var(--reader-surface); border-right:1px solid var(--reader-line); padding:20px 16px; }
body[data-pages="open"] #viewer-container { left:184px; }
#thumbnails button { width:100%; margin-bottom:16px; border:2px solid transparent; border-radius:10px; background:var(--reader-canvas); color:var(--reader-muted); padding:10px; font:inherit; font-size:12px; cursor:pointer; }
#thumbnails button:hover { border-color:var(--reader-line); }
#thumbnails button[aria-current="page"] { border-color:var(--reader-accent); color:var(--reader-accent); background:var(--reader-hover); }
#thumbnails canvas { display:block; max-width:100%; height:auto; margin:0 auto 9px; background:#fff; box-shadow:0 2px 8px #0001; }
.reader-message { position:absolute; z-index:20; top:50%; left:50%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:9px; max-width:calc(100% - 40px); width:320px; padding:30px 24px; border:1px solid var(--reader-line); border-radius:18px; background:var(--reader-surface); box-shadow:0 12px 40px #1f243008; text-align:center; color:var(--reader-muted); font-size:13px; }
.reader-message strong { font-size:15px; font-weight:600; color:var(--reader-text); }
.reader-message a { color:var(--reader-accent); }
.reader-loader { width:28px; height:28px; margin-bottom:8px; border:2px solid var(--reader-line); border-top-color:var(--reader-accent); border-radius:50%; animation:reader-spin 1s linear infinite; }
.reader-footer { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; min-height:36px; padding:8px 28px; border-top:1px solid var(--reader-line); background:var(--reader-surface); color:var(--reader-muted); font-size:11px; }
.reader-preview { display:flex; flex:none; align-items:center; justify-content:space-between; gap:16px; padding:14px 28px; background:var(--reader-hover); border-bottom:1px solid var(--reader-line); }
.reader-preview__copy { min-width:0; }
.reader-preview strong { display:block; color:var(--reader-accent); font-size:13px; font-weight:650; }
.reader-preview p { margin:4px 0 0; font-size:12px; color:var(--reader-muted); line-height:1.5; }
.reader-preview__actions { display:flex; align-items:center; flex:none; gap:16px; }
.reader-preview a { text-decoration:none; }
.reader-preview a:focus-visible { outline:2px solid var(--reader-accent); outline-offset:3px; }
.reader-preview .reader-button { font-size:12px; }
.reader-preview__membership { color:var(--reader-accent); font-size:12px; font-weight:600; white-space:nowrap; }
.reader-preview__membership:hover { text-decoration:underline; text-underline-offset:3px; }
@media(max-width:900px) { .reader-preview { align-items:flex-start; flex-direction:column; gap:10px; padding:12px 16px; } .reader-preview__actions { flex-wrap:wrap; gap:12px; } .reader-preview .reader-button { white-space:normal; min-height:40px; padding:9px 14px; text-align:center; } }
@media(max-height:500px) { .reader-preview { padding:8px 16px; gap:8px; } .reader-preview p,.reader-preview__membership { display:none; } .reader-preview__actions { gap:6px; } }
@keyframes reader-spin { to { transform:rotate(360deg); } }
@media(max-width:700px) { .reader-header { padding:12px 16px; min-height:72px; gap:10px; } .reader-controls { padding:8px 12px; gap:5px; } .reader-controls__centre { gap:7px; } .reader-label,.reader-divider,.reader-zoom-step { display:none; } .reader-controls__tools { gap:0; } .reader-button--icon { width:36px; min-height:42px; } .reader-control-group { gap:0; } .reader-toolbar select { width:92px; height:42px; } .reader-brand__mark { width:34px; height:40px; } .reader-brand { gap:9px; } #document-title { font-size:13px; } .reader-button--primary { padding:9px 12px; font-size:12px; } .reader-search { padding:8px 12px; flex-wrap:wrap; } .reader-search label { max-width:none; } #matches { min-width:0; width:100%; order:2; text-align:left; padding:2px 0 0; } .reader-footer { padding:8px 16px; } .reader-footer__hint { display:none; } #viewer-container { inset:16px 0 12px; } #thumbnails { width:130px; padding:16px 10px; } body[data-pages="open"] #viewer-container { left:130px; } }
@media(max-width:359px) { .reader-controls { padding:6px; } .reader-controls__centre { gap:3px; } .reader-button--icon { width:31px; } .reader-toolbar select { width:82px; } #page-number { width:28px; } .reader-page-label { gap:4px; } }
@media(max-width:700px) { #toggle-pages { width:36px; padding:6px; flex:none; } .reader-controls__centre,.reader-controls__tools { flex-shrink:0; } }
@media(max-width:359px) { #toggle-pages,.reader-button--icon { width:28px; } .reader-toolbar select { width:74px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } .reader-loader { animation:none; } }
