.dialogue-heading-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dialogue-heading-actions button, #refreshRunHistory {
  min-height:38px; padding:0 16px; border:1px solid #171914; background:transparent;
  font:700 12px "DM Mono", monospace; cursor:pointer;
}
.confidence-note { margin:12px 0 0; padding:12px 14px; border-left:3px solid #caff16;
  background:#eceadf; font-size:13px; line-height:1.55; color:#55564f; }
.casting-confidence dt, .casting-confidence dd { font-weight:800 !important; }

.run-history-launcher { margin-top:28px; display:flex; align-items:center; justify-content:space-between; gap:30px; }
.run-history-launcher h2 { margin:7px 0 0; }
.run-history-launcher .section-copy { margin-bottom:0; }
.run-history-launcher > button { min-width:240px; min-height:64px; padding:0 20px; display:flex;
  align-items:center; justify-content:space-between; border:1px solid #171914; background:#171914;
  color:#f6f3ea; font:800 12px "DM Mono",monospace; cursor:pointer; }
.run-history-launcher > button b { display:grid; place-items:center; min-width:32px; height:32px;
  padding:0 5px; background:#caff16; color:#171914; }
.run-history-dialog { width:min(1180px,calc(100vw - 32px)); max-height:86vh; padding:34px;
  border:1px solid #171914; background:#f4f1e8; color:#10120f; box-shadow:10px 10px 0 #171914; }
.run-history-dialog::backdrop { background:rgba(8,9,8,.72); }
.run-history-dialog-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:24px;
  padding-right:44px; border-bottom:1px solid #cbc8bb; padding-bottom:20px; }
.run-history-dialog-heading h2 { margin:8px 0; font-size:32px; }
.run-history-dialog-heading p { margin:0; color:#686960; }
.project-run-history { display:grid; gap:10px; margin-top:20px; }
.project-run { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:18px; align-items:center;
  padding:16px 18px; border:1px solid #cbc8bb; background:rgba(255,255,255,.28); }
.project-run > div:first-child { display:grid; gap:4px; }
.project-run span, .project-run small { color:#686960; font:500 11px "DM Mono", monospace; }
.project-run strong { font-size:15px; }
.project-run > b { font:800 12px "DM Mono", monospace; }
.project-run.failed > b { color:#ff573d; }
.project-run.completed > b { color:#438d32; }
.project-run-actions { display:flex; gap:8px; }
.project-run-actions button, .project-run-actions a { padding:10px 12px; border:1px solid #171914;
  background:transparent; color:#171914; text-decoration:none; font:700 10px "DM Mono", monospace; cursor:pointer; }
.project-run-actions .clear-run-history { border-color:#ff573d; color:#c83726; }

.history-action-dialog { width:min(570px,calc(100vw - 32px)); padding:0; border:1px solid #171914;
  background:#f4f1e8; color:#10120f; box-shadow:10px 10px 0 #171914; }
.history-action-dialog::backdrop { background:rgba(8,9,8,.72); }
.history-action-dialog form { padding:34px; }
.history-action-dialog h2 { margin:9px 44px 10px 0; font-size:30px; line-height:1.08; }
.history-action-dialog form > p { margin:0 0 24px; color:#65665e; line-height:1.55; }
.history-action-dialog label { display:grid; gap:9px; font:500 11px "DM Mono",monospace; letter-spacing:.08em; }
.history-action-dialog input { box-sizing:border-box; width:100%; min-height:58px; padding:0 16px;
  border:1px solid #aaa99f; background:#f8f5ed; color:#10120f; font:600 18px Manrope,sans-serif; }
.history-action-dialog input:focus { outline:3px solid rgba(202,255,22,.42); border-color:#171914; }
.history-action-dialog label small { color:#707168; font:400 12px/1.5 Manrope,sans-serif; letter-spacing:0; }
.history-delete-warning { padding:18px; border:1px solid #ff573d; border-left-width:5px;
  background:#fff0eb; }
.history-delete-warning strong { color:#c83726; font:800 12px "DM Mono",monospace; letter-spacing:.08em; }
.history-delete-warning p { margin:9px 0 0; color:#4c332d; font-size:14px; line-height:1.55; }
.history-action-buttons { display:grid; grid-template-columns:1fr 1.6fr; gap:10px; margin-top:26px; }
.history-action-buttons button { min-height:50px; border:1px solid #171914; background:transparent;
  font:800 12px "DM Mono",monospace; cursor:pointer; }
#confirmHistoryAction { background:#caff16; }
#confirmHistoryAction.danger { border-color:#ff573d; background:#ff573d; color:#fff; }
#confirmHistoryAction:disabled { opacity:.55; cursor:wait; }

.production-preflight-dialog { width:min(720px,calc(100vw - 32px)); padding:34px; border:1px solid #171914;
  background:#f4f1e8; color:#10120f; box-shadow:10px 10px 0 #171914; }
.production-preflight-dialog::backdrop { background:rgba(8,9,8,.72); }
.production-preflight-dialog h2 { margin:8px 0; font-size:30px; }
.production-preflight-dialog > p { color:#66675e; }
.production-preflight-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:24px 0;
  border-top:1px solid #cbc8bb; border-left:1px solid #cbc8bb; }
.production-preflight-summary div { display:grid; gap:8px; padding:16px; border-right:1px solid #cbc8bb;
  border-bottom:1px solid #cbc8bb; }
.production-preflight-summary span { font:500 10px "DM Mono", monospace; color:#707168; }
.production-preflight-summary strong { font-size:17px; overflow-wrap:anywhere; }
.preflight-note { padding:14px; background:#e8e5da; font-size:13px; line-height:1.55; }
.preflight-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.preflight-actions button { min-height:46px; padding:0 20px; border:1px solid #171914; background:transparent;
  font:800 12px "DM Mono", monospace; cursor:pointer; }
#confirmProductionPreflight { background:#caff16; }

.consistency-dashboard { margin:26px 0; padding:24px; border:1px solid #cbc8bb; }
.result-feature-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.result-feature-heading span { color:#ff573d; font:500 11px "DM Mono", monospace; letter-spacing:.11em; }
.result-feature-heading h3 { margin:7px 0 0; font-size:24px; }
.result-feature-heading > strong { font-size:44px; line-height:1; }
.consistency-metrics { display:grid; grid-template-columns:repeat(4,1fr); margin-top:22px; border:1px solid #cbc8bb; }
.consistency-metrics div { display:grid; gap:8px; padding:16px; border-right:1px solid #cbc8bb; }
.consistency-metrics div:last-child { border-right:0; }
.consistency-metrics span { font:500 10px "DM Mono", monospace; }
.consistency-metrics b { font-size:24px; }
.consistency-characters { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.consistency-characters span { padding:8px 10px; background:#171914; color:#f6f3ea; font:500 11px "DM Mono", monospace; }
.consistency-dashboard > p, .export-presets > p { color:#686960; font-size:13px; margin:14px 0 0; }
.export-links { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:20px; }
.export-links a { display:grid; grid-template-columns:1fr auto; gap:5px 10px; min-width:0; padding:16px;
  border:1px solid #171914; color:#171914; text-decoration:none; }
.export-links b { font-size:16px; }
.export-links span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 9px "DM Mono", monospace; }
.export-links i { grid-column:2; grid-row:1/3; align-self:center; font-size:22px; font-style:normal; }

#downloadBtn { min-width:310px; font-size:14px; font-weight:900; letter-spacing:.035em; color:#090b08; }
#downloadBtn span { text-shadow:0 0 .01px currentColor; }
#downloadBtn b { font-size:28px; line-height:1; }

@media (max-width:900px) {
  .run-history-launcher { align-items:stretch; flex-direction:column; }
  .run-history-launcher > button { width:100%; }
  .project-run { grid-template-columns:1fr auto; }
  .project-run-actions { grid-column:1/-1; }
  .consistency-metrics, .export-links { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:560px) {
  .production-preflight-summary, .consistency-metrics, .export-links { grid-template-columns:1fr; }
  .consistency-metrics div { border-right:0; border-bottom:1px solid #cbc8bb; }
}
