/* Shared reading-dialog typography; the format matrix uses the reference layout. */
.downloads-dialog { width:min(520px,calc(100vw - 28px)); }
.downloads-dialog[open] { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.downloads-dialog .dialog-header { flex:none; padding:24px var(--reading-inset) 12px; border-bottom:1px solid var(--line); overflow:hidden; scrollbar-gutter:stable both-edges; }
.downloads-dialog .dialog-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 var(--reading-inset) 28px; scrollbar-gutter:stable both-edges; scrollbar-color:#806947 transparent; }
.downloads-dialog .download-option { display:grid; grid-template-columns:minmax(0,1fr) 202px; gap:24px; align-items:center; padding:24px 0; }
.downloads-dialog .download-option:last-child { border-bottom:0; padding-bottom:0; }
.downloads-dialog .download-option h3 { font:700 12px/1.4 TalkingBoard,Georgia,serif; letter-spacing:.08em; }
.downloads-dialog .download-option p { margin:7px 0 0; max-width:220px; font:12px/1.6 var(--serif); white-space:pre-line; }
.downloads-dialog .download-formats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.downloads-dialog .download-format { min-width:0; min-height:58px; padding:10px 8px; justify-content:center; gap:5px; border:1px solid var(--line); border-radius:6px; background:rgb(12 8 5 / 12%); font:700 12px/1.2 TalkingBoard,Georgia,serif; letter-spacing:.04em; }
.downloads-dialog .download-format small { margin:0; font:11px/1.2 var(--serif); letter-spacing:0; }
.downloads-dialog .download-format[aria-disabled="true"] { opacity:.4; cursor:default; }
.downloads-dialog .download-format[href]:hover { color:var(--accent); border-color:var(--accent); }
@media(max-width:699px) and (orientation:portrait) {
 .downloads-dialog .dialog-header { padding-top:20px; }
}
@media(max-width:539px) {
 .downloads-dialog .download-option { grid-template-columns:minmax(0,1fr); gap:12px; padding-block:20px; }
 .downloads-dialog .download-option p { max-width:none; }
 .downloads-dialog .download-formats { width:202px; max-width:100%; }
}
@media(orientation:landscape) and (max-height:599px) {
 .downloads-dialog .dialog-header { padding-top:12px; }
 .downloads-dialog .dialog-header h2 { margin:2px 0; }
}
