/* Organization assets remain usable in a narrow composer and phone-sized dialog. */
#build-upload-files { justify-self:start; min-height:44px; }
#build-attachments { display:flex; flex-wrap:wrap; gap:6px; }
.build-attachment { display:flex; align-items:center; gap:6px; max-width:100%; background:#edf3ff; border-radius:8px; padding:2px 8px; }
.build-attachment a { overflow-wrap:anywhere; font-size:13px; }
.build-attachment button { min-width:44px; min-height:44px; border:0; background:transparent; cursor:pointer; }

#build-internal-files { width:min(1200px,96vw); height:min(850px,94dvh); max-width:96vw; max-height:94dvh; padding:0; border:1px solid #d6e1ef; border-radius:16px; overflow:hidden; color:#233e62; }
#build-internal-files[open] { display:flex; flex-direction:column; }
#build-internal-files::backdrop { background:#0b162aa6; }
.build-files-heading,.build-files-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 20px; flex-shrink:0; background:white; }
.build-files-heading h2 { margin:0; font-size:22px; }
.build-files-footer { border-top:1px solid #d6e1ef; }
.build-files-footer p { margin:0; overflow-wrap:anywhere; }
.build-files-body { flex:1; min-height:0; overflow:hidden; --files-sidebar:250px; }
#build-internal-files .n3xra-files-shell { height:100%; }
#build-internal-files .n3xra-modal { z-index:20; }
#build-internal-files button { min-height:40px; }
@media(max-width:700px) {
 #build-internal-files { width:98vw; max-width:98vw; height:96dvh; max-height:96dvh; }
 .build-files-heading,.build-files-footer { padding:10px; gap:8px; }
 .build-files-footer { flex-wrap:wrap; } .build-files-footer button { width:100%; }
 #build-internal-files .n3xra-files-shell { display:flex; flex-direction:column; }
 #build-internal-files .n3xra-files-locations { max-height:24dvh; flex-shrink:0; overflow:auto; }
 #build-internal-files .n3xra-file-view { flex:1; min-height:0; }
}

/* Keep session controls together, separate from views and GitHub actions. */
.build-toolbar {height:auto;min-height:76px;}
.build-workspace-actions {display:flex;align-items:center;gap:8px;padding-left:16px;margin-left:8px;border-left:1px solid #3a4c61;}
.build-workspace-actions .build-button {width:116px;height:40px;min-height:40px;padding:8px 10px;font-size:.68rem;white-space:nowrap;}
@media(max-width:800px) {
 .build-workspace-actions {width:100%;margin:4px 0 0;padding:12px 0 0;border-left:0;border-top:1px solid #3a4c61;}
 .build-workspace-actions .build-button {flex:1;width:auto;min-height:44px;}
}

.build-session-status {font-size:.72rem;font-weight:700;color:#a7bdff;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;}
.build-review-dialog {box-sizing:border-box;width:min(720px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:min(420px,90dvh);max-height:90dvh;padding:0;border:1px solid #d9e2ef;border-radius:12px;background:#f5f7fb;color:#17253a;overflow:hidden;}
.build-review-dialog[open] {display:flex;flex-direction:column;}
.build-review-dialog.has-files {width:min(1100px,calc(100vw - 32px));height:min(760px,90dvh);}
.build-review-dialog::backdrop,.build-close-dialog::backdrop {background:rgba(5,12,24,.7);}
.build-review-dialog header,.build-review-dialog footer {flex-shrink:0;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.build-review-dialog header {border-bottom:1px solid #d9e2ef;}
.build-review-dialog h2,.build-close-dialog h2 {margin:0;font-size:20px;font-weight:700;}
.build-review-dialog header p {margin:6px 0 0;font-size:12px;color:#65748a;}
.build-review-content {display:flex;flex:1;min-height:0;}
.build-review-content nav {width:240px;flex-shrink:0;overflow:auto;padding:12px;border-right:1px solid #d9e2ef;}
.build-review-content nav button {display:block;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:6px;background:transparent;color:#26374f;text-align:left;font:inherit;font-size:12px;overflow-wrap:anywhere;cursor:pointer;}
.build-review-content nav button.is-selected {background:#dae6ff;color:#174cad;font-weight:700;}
.build-review-content section {min-width:0;min-height:0;overflow:auto;flex:1;display:flex;flex-direction:column;padding:24px;}
.build-review-content h3 {margin:0;font-size:13px;overflow-wrap:anywhere;}
#build-review-summary {margin:auto;text-align:center;padding:24px 0;font-size:16px;font-weight:600;color:#65748a;}
.build-review-content pre {flex:1;overflow:auto;font:12px/1.7 ui-monospace,monospace;white-space:pre;margin-bottom:0;}
.build-review-dialog footer {flex-wrap:wrap;border-top:1px solid #d9e2ef;}
#build-review-confirm {flex-basis:100%;padding-top:12px;border-top:1px solid #d9e2ef;}
#build-review-confirm p {margin:0 0 12px;font-size:14px;line-height:1.6;}
.build-text-button {min-height:44px;padding:8px 0;border:0;background:transparent;color:#2458cc;font:inherit;font-size:13px;font-weight:600;cursor:pointer;}
.build-text-button:hover {text-decoration:underline;}
.build-text-button:disabled {opacity:.5;cursor:default;}
.build-text-button:focus-visible {outline:2px solid #2458cc;outline-offset:4px;border-radius:3px;}
.build-close-dialog {max-height:90dvh;overflow:auto;box-sizing:border-box;width:min(460px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:28px;border:1px solid #d9e2ef;border-radius:12px;background:#f5f7fb;color:#17253a;}
.build-close-dialog p {font-size:14px;line-height:1.65;color:#65748a;}
.build-close-choices {display:flex;flex-direction:column;gap:12px;margin-top:24px;}
.build-close-choices .build-button {width:100%;min-height:44px;}
.build-close-choices .build-button-secondary {color:#2458cc;border-color:#cbd7ea;}
.build-close-choices .build-discard-button {background:transparent;border-color:#d3dceb;color:#b32739;}
#build-close-error {color:#b32739;}
@media(max-width:800px) {
 .build-review-dialog header,.build-review-dialog footer {padding:16px;gap:12px;flex-wrap:wrap;}
 .build-review-content {flex-direction:column;}
 .build-review-content nav {width:auto;max-height:140px;border-right:0;border-bottom:1px solid #d9e2ef;}
 .build-review-content section {padding:16px;}
 .build-review-dialog header .build-text-button {padding:0;}
 .build-review-dialog footer .build-text-button {text-align:left;}
 #build-review-summary {padding:24px 0;}
}
