/* Shared typography and responsive controls; deliberately excludes player canvases. */
body.ui-polish { line-height: 1.65; color: #1e293b; }
body.ui-polish :is(h1,h2,h3,h4,h5,h6,.card-title,.task-title,.modal-title) { line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
body.ui-polish :is(.hub-head p,.lead-in,.form-text,.text-muted,.alert,.hub-msg,.task-meta) { overflow-wrap: anywhere; }
body.ui-polish :is(.hub-head,.chk-top,.fix-top,.card-header,.modal-header) > div { min-width: 0; }
body.ui-polish :is(.hub-actions,.chk-actions,.fix-top > div,.modal-footer) { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
body.ui-polish .btn { line-height:1.45; white-space:normal; }
body.ui-polish .form-label { margin-bottom: .4rem; line-height:1.5; }
body.ui-polish :is(.table:not(.hub-grid)) :is(th,td) { vertical-align:middle; line-height:1.55; }
body.ui-polish .table:not(.hub-grid) th { white-space:nowrap; color:#475569; }
body.ui-polish .table:not(.hub-grid) td { overflow-wrap:anywhere; }
body.ui-polish :is(.modal-body,.card-body,.hub-card) > .text-muted.small { line-height:1.7; }
body.ui-polish .modal-dialog-scrollable .modal-footer { background:#fff; }
body.ui-polish summary { cursor:pointer; color:#334155; padding:8px 0; font-weight:600; }
body.ui-polish details[open] > summary { margin-bottom:8px; }
.site-mobile-nav { padding:12px 16px; background:white; border-bottom:1px solid #e2e8f0; display:flex; justify-content:space-between; align-items:center; }
.site-mobile-nav button { min-width:80px; }
.workflow-stages { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.workflow-stage { border:1px solid #dbe3ee; background:white; border-radius:12px; padding:16px; min-width:0; }
.workflow-stage p { margin:8px 0; font-size:.875rem; color:#64748b; }
.workflow-stage .stage-metrics { font-weight:600; color:#1e293b; }
.cfg-list-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin-bottom:16px; }
.cfg-list-tools label { display:block; margin-bottom:4px; font-size:.875rem; }
.cfg-list-tools > div { flex:1 1 160px; }
.cfg-pager { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; padding:12px 4px; }
.config-grid .section-card .card-body { gap:8px; }
.config-grid .cfg-name { min-height:2.9em; }
.cfg-danger-zone { background:#fff7f7; border:1px solid #fecaca; border-radius:8px; padding:10px; margin-top:12px; }
.cfg-danger-zone summary { color:#b91c1c!important; }
.site-activity { padding:12px 14px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; margin:12px 0; overflow-wrap:anywhere; }
.site-activity progress { display:block; width:100%; height:10px; margin:8px 0; accent-color:#2563eb; }
.site-activity small { color:#64748b; }
.site-activity.has-error { background:#fff7ed; border-color:#fdba74; }
body > .site-activity { position:fixed; bottom:16px; right:16px; width:min(440px,calc(100vw - 32px)); z-index:1090; }
#siteNoticeHost { position:fixed; right:16px; top:16px; z-index:1095; width:min(460px,calc(100vw - 32px)); max-height:75vh; overflow:auto; }
.site-notice { display:flex; gap:16px; justify-content:space-between; border:1px solid #cbd5e1; border-left:4px solid #2563eb; border-radius:10px; padding:14px; margin-bottom:10px; background:white; box-shadow:0 5px 24px #0f172a20; }
.site-notice span { white-space:pre-wrap; overflow-wrap:anywhere; }
.site-notice .btn-close { flex-shrink:0; }
.site-notice-success { border-left-color:#15803d; }
.site-notice-error { border-left-color:#dc2626; }
.word-grid-views { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin:12px 0; }
.word-grid-views select { width:auto; min-width:160px; }
.hub-grid .word-cell, .hub-grid th[data-key="word_key"] { position:sticky; left:0; z-index:2; background:#fff; box-shadow:2px 0 0 #e2e8f0; }
.hub-grid th[data-key="word_key"] { z-index:5; background:#f1f5f9; }
.hub-grid tr.dirty .word-cell { background:#fff7d6; }
.hub-grid tr.source-issue .word-cell { color:#b91c1c; }
.cloud-job-list { max-height:60vh; overflow:auto; }
.cloud-job { border:1px solid #e2e8f0; border-radius:10px; padding:14px; margin-bottom:12px; }
.cloud-job p { margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:767px) {
  .workflow-stages { grid-template-columns:1fr; }
  body.ui-polish .main-content { padding:16px!important; }
  body.ui-polish .sidebar.show { height:auto; position:relative; width:100%; }
  body.ui-polish .chk-shell { padding:12px; }
  body.ui-polish .chk-top,.fix-top { padding:16px; }
  body.ui-polish .hub-head h1 { font-size:1.6rem; }
  body.ui-polish .chk-tabs .nav-link { padding:10px 12px; }
  .cfg-pager { justify-content:space-between; }
}
