:root { color-scheme: light; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html { min-height: 100%; background: #f6d99d; }
body { margin: 0; min-height: 100vh; color: #3f2b1f; background: radial-gradient(circle at 12% 12%, #ffe9b9 0, transparent 32%), linear-gradient(145deg, #f8dea8, #f3c983); }
button, input { font: inherit; }
a { color: inherit; }
.page-shell { max-width: 1050px; min-height: 100vh; margin: auto; padding: clamp(20px, 4vw, 48px); display: flex; flex-direction: column; }
.wordmark { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin: -15px 0 12px; padding: 16px 0; color: #503521; font-size: clamp(13px, 1.3vw, 15px); font-weight: 750; letter-spacing: .08em; line-height: 1; white-space: nowrap; user-select: none; cursor: default; }
.wordmark span { display: inline-block; pointer-events: none; }
.wordmark:focus-visible { outline: 2px solid #503521; outline-offset: 3px; }
.site-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 26px; }
.eyebrow { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; color: #946034; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 64px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.download, .button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 44px; padding: 11px 17px; border: 1px solid #583a26; border-radius: 5px; background: #503521; color: #fff9ed; font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; }
.download:hover, .button:hover { background: #68452c; }
.download:focus-visible, .button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #986126; outline-offset: 3px; }
.viewer-actions[hidden], .empty-state[hidden], .load-status[hidden] { display: none; }
main { flex: 1; }
.pdf-pages { width: 100%; max-width: 900px; margin: 0 auto; display: grid; gap: 22px; }
.pdf-page { position: relative; overflow: hidden; margin: 0 auto; background: #fff; box-shadow: 0 20px 50px rgba(97, 59, 22, .18); }
.pdf-page canvas { display: block; }
.textLayer { position: absolute; inset: 0; overflow: clip; text-align: initial; line-height: 1; letter-spacing: normal; word-spacing: normal; transform-origin: 0 0; -webkit-text-size-adjust: none; text-size-adjust: none; --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); }
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; user-select: text; }
.textLayer > :not(.markedContent), .textLayer .markedContent span:not(.markedContent) { --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height)); --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }
.textLayer .markedContent { display: contents; }
.textLayer ::selection { background: rgba(70, 109, 210, .28); color: transparent; }
.linkLayer { position: absolute; inset: 0; pointer-events: none; }
.linkLayer a { position: absolute; pointer-events: auto; }
.linkLayer a:focus-visible { outline: 3px solid #986126; outline-offset: 2px; }
.load-status { max-width: 900px; min-height: min(60vh, 560px); margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #503521; text-align: center; }
.load-status.has-message { min-height: 0; margin: 16px auto; color: #735037; }
.loading-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 5vw, 44px); line-height: 1.1; }
.loading-dots { display: flex; gap: 9px; margin: 18px 0 22px; }
.loading-dots span { width: 9px; height: 9px; border-radius: 50%; background: #8c592f; animation: loading-bob .9s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
.loading-note { color: #735037; font-size: 14px; }
@keyframes loading-bob { 0%, 60%, 100% { opacity: .45; transform: translateY(0) scale(.85); } 30% { opacity: 1; transform: translateY(-7px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .loading-dots span { animation: none; opacity: .8; } }
.viewer-actions { max-width: 900px; margin: 20px auto 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.viewer-note { margin: 0; color: #735037; font-size: 13px; text-align: center; }
.viewer-note a { text-underline-offset: 2px; }
.empty-state { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed rgba(86, 53, 28, .4); border-radius: 7px; text-align: center; }
.empty-icon { font-size: 44px; color: #b7793a; }
.empty-state h2 { margin: 12px 0 4px; font-family: Georgia, serif; font-size: 33px; font-weight: 500; }
.empty-state p { margin: 0; color: #735037; }
.admin-main { width: 100%; max-width: 540px; margin: clamp(30px, 8vh, 100px) auto; }
.admin-card { padding: clamp(25px, 5vw, 42px); border: 1px solid rgba(86, 53, 28, .18); border-radius: 7px; background: #fff9ed; box-shadow: 0 20px 50px rgba(97, 59, 22, .12); }
.admin-card h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.admin-card p { margin: 0 0 24px; color: #735037; line-height: 1.5; }
.field { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
input { display: block; width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #b99a78; border-radius: 4px; background: #fff; color: #3f2b1f; }
.field-note { margin: 8px 0 20px !important; font-size: 12px; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.text-button { padding: 0; border: 0; background: none; color: #735037; text-decoration: underline; cursor: pointer; }
.message { min-height: 24px; margin: 17px 0 0 !important; font-size: 13px; }
.message.error { color: #9e2d21; }
.message.success { color: #30643b; }
@media (max-width: 620px) { .site-header { align-items: start; } .download { padding: 10px; } .pdf-pages { gap: 14px; } }
