/* Equal control columns and a permanently reserved result region. */
.bn-tool-page .tool-card #isbn-tool .price-calculator-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;align-items:start}
.bn-tool-page .tool-card #isbn-tool .price-calculator-fields>.calcsection{float:none;width:100%;min-width:0;max-width:100%;padding:0;border:0}
.bn-tool-page .tool-card #isbn-tool :is(.mainopt,.calcblock){float:none;width:100%;min-width:0;margin:0;padding:0}
.bn-tool-page .tool-card #isbn-tool :is(input,select){width:100%!important;max-width:100%;box-sizing:border-box}
.bn-tool-page .tool-card #isbn-tool .mainopt>label{display:block;margin-bottom:4px}
.bn-tool-page .tool-card #isbn-tool #isbn-price-note{max-width:none;font-size:11px;line-height:1.4;margin:5px 0 0}
.bn-tool-page .tool-card #isbn-tool #isbn-custom{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;grid-column:1 / -1}
.bn-tool-page .tool-card #isbn-tool #isbn-custom[hidden]{display:none}
.bn-tool-page .tool-card #isbn-tool>.price-details-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:stretch;min-height:366px;box-sizing:border-box}
.bn-tool-page .tool-card #isbn-tool .isbn-result-info{min-width:0;display:flex;flex-direction:column}
/* Shared tool styles hide empty paragraphs; keep these reserved rows in every state. */
.bn-tool-page .tool-card #isbn-tool :is(#isbn-status,#isbn-numbers,#isbn-size){display:block!important}
.bn-tool-page .tool-card #isbn-tool #isbn-status{min-height:2.8em;line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere}
.bn-tool-page .tool-card #isbn-tool #isbn-numbers{min-height:3.4em;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere;margin:0 0 8px}
.bn-tool-page .tool-card #isbn-tool #isbn-size{min-height:4em;line-height:1.4;overflow-wrap:anywhere;margin:0 0 8px}
.bn-tool-page .tool-card #isbn-tool #isbn-exports{margin:auto 0 0;min-height:84px}
.bn-tool-page .tool-card #isbn-tool .bn-tool-actions{display:flex;flex-wrap:wrap;align-content:flex-start;gap:8px}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download]{min-height:36px;padding:7px 14px;border:1px solid #cb3340;border-radius:5px;margin:0}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download="pdf"]{background:#cb3340;color:#fff;border-color:#cb3340}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download="svg"]{background:#fff;color:#cb3340;border-color:#cb3340}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download="png"]{background:#222;color:#fff;border-color:#222}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download]:disabled{background:#e6e6e6!important;border-color:#d5d5d5!important;color:#888!important;cursor:default;opacity:1}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-panel{min-width:0;margin:0;display:flex;flex-direction:column;gap:8px}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{position:relative;flex:1;min-height:286px;display:grid;background:#fff;border:1px solid #e6e6e6}
.bn-tool-page .tool-card #isbn-tool #isbn-preview{display:block;position:absolute;inset:0;grid-column:auto;grid-row:auto;align-self:stretch;width:100%;height:100%;min-height:0;max-height:none;margin:0;max-width:100%;background:#fff}
/* The SVG contains the complete physical white field. Its viewBox preserves all quiet zones. */
.bn-tool-page .tool-card #isbn-tool #isbn-preview svg{display:block;width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain}
.bn-tool-page .tool-card #isbn-tool #isbn-placeholder{z-index:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;min-width:0;padding:20px;text-align:center;color:#777;background:#fafafa}
.bn-tool-page .tool-card #isbn-tool #isbn-placeholder[hidden]{display:none}
.bn-tool-page .tool-card #isbn-tool .isbn-placeholder-mark{width:80%;height:84px;opacity:.14;background:repeating-linear-gradient(90deg,#555 0 2px,transparent 2px 5px,#555 5px 6px,transparent 6px 9px,#555 9px 13px,transparent 13px 18px)}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-panel figcaption{font-size:11px;line-height:1.4;color:#777;margin:0;min-height:2.8em}
/* Stacked results need their own reserve: the preview no longer sets the information height. */
@media(max-width:767px){
 .bn-tool-page .tool-card #isbn-tool .isbn-result-info{min-height:430px}
}
@media(max-width:360px){
 .bn-tool-page .tool-card #isbn-tool .isbn-result-info{min-height:500px}
}
@media(min-width:601px) and (max-width:767px){
 .bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:1fr;gap:16px}
}
@media(max-width:600px){
 .bn-tool-page .tool-card #isbn-tool .price-calculator-fields{grid-template-columns:1fr;gap:12px}
 .bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:1fr;gap:16px}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{min-height:250px}
 .bn-tool-page .tool-card #isbn-tool #isbn-custom{grid-template-columns:1fr;gap:12px}
}

.bn-tool-page #isbn-tool #isbn-exports{min-height:100px}
.isbn-download-title{display:block;border-bottom:1px solid #ccc;padding-bottom:7px;margin-bottom:9px}
.bn-tool-page #isbn-tool .bn-tool-actions{display:flex;flex-wrap:nowrap;gap:8px;margin:0}
.bn-tool-page .tool-card #isbn-tool [data-isbn-download]{display:inline-flex;align-items:center;justify-content:center;width:65px;min-width:0;height:36px;min-height:36px;padding:7px 10px;white-space:nowrap;font:14px/20px AvenirMed,Arial,sans-serif;letter-spacing:0;box-sizing:border-box}
.isbn-png-download{display:flex;flex-direction:column;align-items:center;gap:4px}
.isbn-png-download small{font-size:10px;color:#777;line-height:14px}
.bn-tool-page #isbn-tool #isbn-results{transition:opacity .25s ease}
.bn-tool-page #isbn-tool #isbn-results[data-state=pending]{opacity:.5}
.bn-tool-page #isbn-tool #isbn-status{height:72px;min-height:72px;overflow:auto;font-size:13px}
.bn-tool-page #isbn-tool #isbn-numbers{height:64px;min-height:64px;font-size:14px}
.bn-tool-page #isbn-tool #isbn-size{height:66px;min-height:66px;font-size:13px}
.bn-tool-page #isbn-tool #isbn-price-note{height:46px;overflow:auto}
@media(max-width:767px){.bn-tool-page .tool-card #isbn-tool .isbn-result-info{min-height:330px}}

/* r8: compact result, with fixed text slots in empty, error and ready states. */
.bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:minmax(0,1fr) 250px;align-items:center;min-height:0;gap:24px;padding:16px}
.bn-tool-page .tool-card #isbn-tool .isbn-result-info{min-height:0}
.bn-tool-page .tool-card #isbn-tool #isbn-status{height:60px;min-height:60px;margin:0 0 4px;font:600 16px/20px AvenirMed,Arial,sans-serif;color:#262626;overflow:auto}
.bn-tool-page .tool-card #isbn-tool #isbn-status.isbn-error{color:#cb3340}
.bn-tool-page .tool-card #isbn-tool #isbn-numbers{height:44px;min-height:44px;line-height:22px;margin:0 0 4px}
.bn-tool-page .tool-card #isbn-tool #isbn-size{height:38px;min-height:38px;font-size:12px;line-height:18px;margin:0 0 10px}
.bn-tool-page .tool-card #isbn-tool #isbn-exports{min-height:0;margin:0}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{flex:none;height:150px;min-height:150px}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-panel figcaption{height:32px;min-height:32px;font-size:10px;line-height:14px}
.bn-tool-page .tool-card #isbn-tool .isbn-placeholder-mark{height:45px}
.bn-tool-page .tool-card #isbn-tool #isbn-placeholder{padding:8px;font-size:12px;gap:5px}
.isbn-download-title small{font:11px/1.4 AvenirReg,Arial,sans-serif;color:#777}
@media(max-width:767px){
 .bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:1fr;gap:16px}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-panel{width:250px;max-width:100%;justify-self:center}
 .bn-tool-page .tool-card #isbn-tool #isbn-status{height:80px;min-height:80px}
 .bn-tool-page .tool-card #isbn-tool #isbn-numbers{height:48px;min-height:48px;font-size:13px}
 .bn-tool-page .tool-card #isbn-tool #isbn-size{height:54px;min-height:54px}
}
/* Keep number rows immediately below a one-line status; errors use the fixed detail slot. */
.bn-tool-page .tool-card #isbn-tool #isbn-status{height:24px;min-height:24px;line-height:24px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.bn-tool-page .tool-card #isbn-tool #isbn-size{height:54px;min-height:54px;overflow:auto}
.bn-tool-page .tool-card #isbn-tool #isbn-status.isbn-error~#isbn-size{color:#cb3340}
@media(max-width:767px){.bn-tool-page .tool-card #isbn-tool #isbn-size{height:72px;min-height:72px}}

/* r9: the rule follows the download buttons; preview matches the info height. */
.bn-tool-page #isbn-tool .isbn-download-title{width:211px;max-width:100%;box-sizing:border-box}
.bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:minmax(0,1fr) 290px;align-items:stretch}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{height:auto;min-height:174px;flex:1}
@media(max-width:767px){
 .bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:1fr}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-panel{width:290px}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{height:174px;flex:none}
}

/* r10: the larger preview keeps its upper-right anchor and balanced panel padding. */
.bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:minmax(0,1fr) 310px;padding-top:16px;padding-bottom:16px}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-panel{align-self:stretch}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{min-height:186px}
.bn-tool-page .tool-card #isbn-tool .isbn-preview-panel figcaption{min-height:0;height:auto;line-height:14px}
@media(max-width:767px){
 .bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:1fr}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-panel{width:310px;justify-self:end;max-width:100%}
 .bn-tool-page .tool-card #isbn-tool .isbn-preview-stage{height:186px}
}
@media(max-width:767px){.bn-tool-page .tool-card #isbn-tool>.price-details-panel{grid-template-columns:minmax(0,1fr)}}
