/* Incident Report System: page styles. Moved from the Apps Script page (index.html lines 10-887) with two edits:
   .hidden now carries !important, and the mobile rule for #statusHistoryModal > div keeps only its height (see the note there).
   The rules that replace the old inline style attributes are added below. No inline styles are used anywhere (strict CSP). */
:root {
  --primary-color: #007BFF;
  --primary-hover: #0056b3;
  --bg-color: #f5f7fa;
  --text-color: #333;
  --error-color: #dc3545;
  --success-color: #28a745;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  
  /* Status colors */
  --status-resolved: #28a745;      /* Green */
  --status-in-progress: #007bff;   /* Blue */
  --status-pending: #ffc107;       /* Yellow/Amber */
  --status-blocked: #dc3545;       /* Red */
  --status-unresolved: #6c757d;    /* Gray */
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #1d2433;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ux2: phone-first page. The content sits on the page colour under the header band, no card, no entry animation. */
.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 8px;
  text-align: left;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 600;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
  display: block;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.required {
  color: var(--error-color);
}

input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #6b7280;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s;
  box-sizing: border-box;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
}

input[type="radio"], input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

select {
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2714%27%20height%3D%278%27%20viewBox%3D%270%200%2014%208%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M7%208L0%200h14z%27%20fill%3D%27%23999%27%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 10px;
  padding-right: 35px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}

/* Radio Button Group */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

.radio-label input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid #ddd;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: all 0.3s;
}

.checkbox-label:hover {
  border-color: var(--primary-color);
  background-color: #f0f0f0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
}

.form-section {
  margin-bottom: 25px;
}

.form-section h4 {
  color: #555;
  font-size: 16px;
  margin-bottom: 15px;
}

/* File Upload */
.file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 100%;
}

.file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: block;
  padding: 12px 15px;
  border: 2px dashed #ddd;
  border-radius: 6px;
  text-align: center;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

.file-upload:hover .file-upload-label {
  border-color: var(--primary-color);
  background-color: #e8f0fe;
}

.file-list {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.file-item {
  padding: 5px 0;
}

/* Input Animation */
.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-animation {
  position: relative;
  display: inline-block;
  width: 100%;
}

.input-animation::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  height: 2px;
  width: 0;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

.input-animation.active::after {
  width: 100%;
  left: 0;
}

input::placeholder {
  color: #999;
}

/* Buttons */
/* ux2 (D-UX1): white on #007BFF is 3.98:1, so buttons use #0056b3 (7.04:1). No bounce. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  background-color: var(--primary-hover);
  border: 2px solid var(--primary-hover);
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn:hover {
  background-color: #004494;
  border-color: #004494;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.btn:disabled {
  background-color: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

#result, #submitResult {
  margin-top: 30px;
  padding: 15px;
  border-radius: 6px;
  font-weight: 500;
  display: none;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
  vertical-align: middle;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--error-color);
  padding: 15px;
  border-radius: 6px;
}

.status-result {
  padding: 20px;
  text-align: left;
  line-height: 1.6;
  border-left-width: 4px;
  border-left-style: solid;
  transition: all 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.status-result::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
  pointer-events: none;
}

.status-resolved {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--status-resolved);
  border-left-color: var(--status-resolved);
}

.status-in-progress {
  background-color: rgba(0, 123, 255, 0.1);
  color: var(--status-in-progress);
  border-left-color: var(--status-in-progress);
}

.status-pending {
  background-color: rgba(255, 193, 7, 0.1);
  color: #856404;
  border-left-color: var(--status-pending);
}

.status-blocked {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--status-blocked);
  border-left-color: var(--status-blocked);
}

.status-unresolved {
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--status-unresolved);
  border-left-color: var(--status-unresolved);
}

.success {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  padding: 20px;
  border-left: 4px solid var(--success-color);
  text-align: left;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

/* Tooltip Styles */
.tooltip {
  display: inline-block;
  position: relative;
  cursor: help;
  margin-left: 5px;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #e8f0fe;
  color: var(--primary-color);
  font-size: 11px;
  font-weight: bold;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  max-width: 250px;
  white-space: normal;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Form Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0fe;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 16px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #e8f0fe;
  border-radius: 50%;
  color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.loading-text {
  color: #333;
  font-size: 14px;
}

/* Success Animation */
.success-checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--success-color);
  position: relative;
  margin-left: 8px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.success-checkmark::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

/* Input validation feedback.
   Text boxes: green or red as soon as something is typed (a box that shows its placeholder shows neither).
   Dropdowns, date and time boxes have no placeholder and are "invalid" while still empty, so they used to look wrong
   on first view: they colour only after the person has used them or tried to send (:user-valid / :user-invalid; a browser
   without those simply shows no colour there, and the browser's own bubble still names the missing field). */
input:not([type="radio"]):not([type="checkbox"]):not([type="date"]):not([type="time"]):not([aria-invalid="true"]):valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown):not([aria-invalid="true"]) {
  border-color: var(--success-color);
}

input:not([type="radio"]):not([type="checkbox"]):not([type="date"]):not([type="time"]):invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: var(--error-color);
}

select:user-valid:not([aria-invalid="true"]),
input[type="date"]:user-valid:not([aria-invalid="true"]),
input[type="time"]:user-valid:not([aria-invalid="true"]) {
  border-color: var(--success-color);
}

select:user-invalid,
input[type="date"]:user-invalid,
input[type="time"]:user-invalid {
  border-color: var(--error-color);
}

/* A field the page refused (message under it): red, whatever the colour rules above say. */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error-color);
}

/* The refusal message under a field */
.field-error {
  margin-top: 6px;
  color: var(--error-color);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  scroll-margin-bottom: 80px;
}

/* Result boxes and messages scrolled into view stop above the fixed footer bar instead of under it. */
#result, #submitResult, #updateResult, #reportAuthResult {
  scroll-margin-bottom: 80px;
}

.validation-message {
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.validation-message.error {
  color: var(--error-color);
  display: block;
}

.validation-message.success {
  color: var(--success-color);
  display: block;
}

/* Character Counter */
.char-counter {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

.char-counter.warning {
  color: var(--error-color);
}


.progress-container {
  background-color: #e9ecef;
  border-radius: 8px;
  height: 24px;
  position: relative;
  overflow: hidden;
  margin-top: 15px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  transition: width 0.3s ease;
  position: relative;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  color: var(--text-color);
  z-index: 1;
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
  body {
    padding: 0;
  }
  
  .container {
    padding: 18px 16px 8px;
  }
  
  h2 {
    font-size: 24px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-row .form-group {
    margin-bottom: 20px;
  }
  
  input:not([type="radio"]):not([type="checkbox"]), select, textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 15px;
    min-height: 44px;
  }
  
  .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    min-height: 44px;
  }
  
  .file-upload-label {
    padding: 16px;
  }
  
  .tooltip-content {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    white-space: normal;
    padding: 15px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
  }
  
  .tooltip-content::after {
    display: none;
  }
  
  /* Old page: the panel's inline margin, max-width, max-height and radius beat this rule,
     so only the height applied. Kept as it looked. */
  #statusHistoryModal > div {
    height: 100vh;
  }
  
}

@media (max-width: 480px) {
  .container {
    padding: 16px 16px 8px; /* 16 px sides: the step bar's -16px margins reach the edge without a sideways scroll */
  }
  
  h2 {
    font-size: 20px;
  }
  
  .section-header {
    font-size: 14px;
  }
}

/* ---- Rules converted from the old page's inline style attributes (strict CSP: no inline styles).
   Selectors start with "body .container" so they win over the base rules exactly as the inline styles did. ---- */
body .container .w-full {
  width: 100%;
}
body .container .ta-80 {
  min-height: 80px;
}
body .container .witness-box {
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: left;
}
body .container .witness-title {
  color: #1976d2;
  margin-top: 0;
}
body .container .witness-lead {
  color: #424242;
  margin-bottom: 15px;
}
body .container .witness-steps {
  color: #424242;
  line-height: 1.8;
  margin-bottom: 15px;
}
body .container .ta-left {
  text-align: left;
}
body .container .witness-btn {
  background-color: #1976d2;
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 20px;
  display: inline-block;
  font-weight: 500;
}
body .container .mt-10 {
  margin-top: 10px;
}
body .container .witness-link {
  color: #1976d2;
  font-size: 12px;
  display: inline-block;
  padding: 15px 4px;
  min-height: 44px;
  box-sizing: border-box;
}
body .container .witness-note {
  background-color: #fff3cd;
  padding: 10px;
  border-radius: 5px;
  border-left: 3px solid #ffc107;
  margin-top: 15px;
}
body .container .witness-note-text {
  color: #856404;
}
body .container .upload-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
body .container .upload-hint {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}
body .container .mt-15 {
  margin-top: 15px;
}
body .container .wrap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body .container .label-block {
  display: block;
  text-align: left;
  margin-bottom: 10px;
}
body .container .status-key {
  margin-top: 30px;
  text-align: left;
  font-size: 12px;
  color: #666;
}
body .container .key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}
body .container .flex-center {
  display: flex;
  align-items: center;
}
body .container .panel {
  background-color: #f5f7fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
body .container .panel-title {
  margin-top: 0;
  color: #333;
}
body .container .readonly-field {
  background-color: #f5f5f5;
}
body .container .ta-120 {
  min-height: 120px;
}
body .container .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
body .container .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}
body .container .modal-panel {
  background-color: white;
  margin: 50px auto;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  position: relative;
}
body .container .modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
body .container .radio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
body .container .custom-range {
  margin-top: 15px;
  padding: 15px;
  background-color: #fff;
  border-radius: 5px;
}
body .container .date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
body .container .date-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
body .container .cb-gap {
  margin-right: 5px;
}
body .container .sev-critical {
  color: #dc3545;
  font-weight: 500;
}
body .container .sev-high {
  color: #fd7e14;
  font-weight: 500;
}
body .container .sev-medium {
  color: #ffc107;
  font-weight: 500;
}
body .container .sev-low {
  color: #28a745;
  font-weight: 500;
}
body .container .check-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}
body .container .cb-gap-lg {
  margin-right: 8px;
}
body .container .btn-row-center {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}
body .container .panel-top {
  background-color: #f5f7fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}
body .container .mt-20 {
  margin-top: 20px;
}
body .container .key-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
}
body .container .key-resolved {
  background-color: var(--status-resolved);
}
body .container .key-in-progress {
  background-color: var(--status-in-progress);
}
body .container .key-pending {
  background-color: var(--status-pending);
}
body .container .key-blocked {
  background-color: var(--status-blocked);
}
body .container .key-unresolved {
  background-color: var(--status-unresolved);
}

/* ---- Classes for elements the script builds (they were inline styles in the old page's template strings) ---- */
body .container .file-list-title { color: var(--primary-color); }
body .container .file-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  margin: 5px 0;
}
body .container .file-remove {
  background: none;
  border: none;
  color: var(--error-color);
  cursor: pointer;
  padding: 5px;
  min-width: 44px;
  min-height: 44px;
}
body .container .file-total-note { font-size: 12px; }
body .container .size-warning {
  color: var(--error-color);
  margin-top: 10px;
  padding: 10px;
  background: #fff3cd;
  border-radius: 4px;
}
body .container .size-warning-plain {
  color: var(--error-color);
  margin-top: 10px;
}
body .container .preview-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}
body .container .ir-code-big { font-size: 1.2em; font-weight: bold; white-space: nowrap; } /* a code never breaks over two lines */
/* The Update ID is about 22 characters: it may break inside the id on a very narrow phone rather than push the page sideways. */
body .container .update-id-big { font-size: 1.2em; font-weight: bold; overflow-wrap: anywhere; }
body .container .keep-note {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px;
  border-radius: 5px;
  border-left: 3px solid #ffc107;
  margin-top: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}
body .container .details-table { width: 100%; font-size: 14px; }
body .container .details-label { padding: 5px; }
body .container .hist-list { max-height: 500px; overflow-y: auto; }
body .container .hist-item {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
}
body .container .hist-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
body .container .hist-time { color: #666; font-size: 12px; }
body .container .hist-body { font-size: 14px; overflow-wrap: anywhere; word-break: break-word; } /* a long attachment link wraps inside the panel */
body .container .hist-resp { color: #666; font-size: 12px; }
body .container .rep-summary {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
body .container .rep-title { color: #333; margin-bottom: 15px; }
body .container .tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
body .container .tile {
  background: white;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
}
body .container .tile-num { font-size: 24px; font-weight: bold; }
body .container .tone-total { color: #17a2b8; }
body .container .tone-good { color: #28a745; }
body .container .tone-warn { color: #ffc107; }
body .container .tone-bad { color: #dc3545; }
body .container .tile-label { font-size: 12px; color: #666; }
body .container .rep-sub { color: #555; margin-bottom: 10px; }
body .container .rep-box {
  background: white;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}
body .container .rep-box-last { margin-bottom: 0; }
body .container .breakdown-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}
body .container .unresolved-box {
  margin-top: 15px;
  padding: 15px;
  background-color: #fff5f5;
  border-left: 4px solid #dc3545;
  border-radius: 5px;
}
body .container .unresolved-title { color: #dc3545; margin-bottom: 10px; }
body .container .rep-done {
  background-color: #d4edda;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}
body .container .rep-done-title { color: #155724; margin-bottom: 10px; }
body .container .rep-done-text { color: #155724; margin-bottom: 10px; }
body .container .rep-link { color: #155724; text-decoration: underline; font-weight: bold; }
body .container .rep-wait {
  color: #155724;
  font-weight: 500;
}
body .container .auth-ok { color: #28a745; }
body .container .auth-err { color: #dc3545; }
body .container .dim { opacity: 0.7; }

/* Result boxes: shown by adding .is-shown (the old page set style.display = "block"). */
#result.is-shown, #submitResult.is-shown { display: block; }
#result.fade-out { opacity: 0; transform: translateY(10px); }

/* Drag highlight on the upload label (the old page set these colours inline while dragging). */
.file-upload-label.drag-over {
  background-color: #e8f0fe;
  border-color: var(--primary-color);
}

/* Loading spinner inside a button: shown by adding .on (the old page set style.display = "inline-block"). */
.loading.on { display: inline-block; }

/* Footer: in the page flow at the end of the content (ux2), so it never covers the step buttons. */
body .version-bar {
  position: static;
  padding: 12px 16px 20px;
  text-align: center;
}
body .version-text {
  color: #666;
  font-size: 12px;
  font-family: 'Segoe UI', sans-serif;
}

/* Touch targets: on a phone, the Yes/No, timeline and filter labels are at least 44 px high (they were 17 to 19 px). */
@media (max-width: 768px) {
  body .container .radio-label,
  body .container .radio-option,
  body .container .flex-center {
    min-height: 44px;
  }
}

/* Add-to-phone hint (PWA build, 20 Nov 2026; site/pwa.js shows it after a report is sent) */
.install-card {
  margin-top: 15px;
  padding: 12px 15px;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  background-color: #e8f0fe;
  color: var(--text-color);
}
.install-card[hidden] { display: none; }
.install-text { margin: 0; line-height: 1.5; }

/* ======================================================================================================
   ux2: reporter-first redesign (ux-mock2/design.md, Sir Roy TG 2648, D88). Tokens from ux-mock/design.md section 4.
   Every new class has its rule here; the rules above stay for the Update Status and Department Reports screens.
   ====================================================================================================== */
:root {
  --blue-700: #0056b3;
  --blue-800: #004494;
  --blue-500: #007BFF;
  --blue-50: #e8f0fe;
  --blue-100: #dbe8ff;
  --ink: #1d2433;
  --ink-soft: #4b5565;
  --line: #d9dee7;
  --line-ctl: #6b7280;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-ink: #7a271a;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --grey-bg: #f2f4f7;
}

[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header band: the page name and two equal tabs (48 px), never running together at 390 px (D2-10) */
.band { background: var(--blue-700); color: #fff; }
.band :focus-visible { outline-color: #fff; }
.band-top {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 8px;
}
.mark { width: 28px; height: 28px; flex: none; }
.band-title { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
.band-nav { max-width: 640px; margin: 0 auto; }
.band .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0 16px 10px;
  list-style: none;
}
.band .tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--blue-100);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.band .tab svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.band .tab.active,
.band .tab[aria-current="page"] { background: #fff; color: var(--blue-700); }

/* Page titles and lead lines */
h2 { color: var(--ink); }
.page-title { margin: 2px 0 6px; font-size: 24px; line-height: 1.2; font-weight: 800; }
.subtitle { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; }
#submitTab > .subtitle { font-size: 13px; margin-bottom: 8px; }
.lede { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; }
.req-note { display: block; margin-top: 2px; font-size: 13px; }
.hint { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; line-height: 1.4; }
.opt {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--grey-bg);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.required { color: var(--danger); font-weight: 700; }
label, .group-label { color: var(--ink); font-size: 15px; font-weight: 700; }
.group-label { display: block; margin: 0 0 4px; padding: 0; }
body .container .form-group { margin-bottom: 18px; }
textarea.bigta { min-height: 200px; }
input::placeholder, textarea::placeholder { color: #6b7280; opacity: 1; }

/* Steps: only with the script (form.steps-on); without it every step shows as one long form */
.step { min-width: 0; margin: 0; padding: 0; border: 0; }
.steps-on .step { display: none; }
.steps-on .step.is-current { display: block; }
.step-review, .steps-only, .step .segs { display: none; }
.steps-on .step-review.is-current { display: block; }
.steps-on .steps-only { display: block; }
.steps-on .step .segs { display: flex; }
.stephead { margin: 0 0 14px; }
.stepnum { margin: 0; color: var(--blue-700); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.step-title { margin: 2px 0 10px; color: var(--ink); font-size: 24px; line-height: 1.2; font-weight: 800; }
.segs { gap: 4px; margin: 0; padding: 0; list-style: none; }
.segs li { flex: 1; height: 6px; border-radius: 3px; background: #c4ccd8; }
.segs li.on, .segs li.now { background: var(--blue-700); }

/* The summary at the top of a step: "N things to fix before you go on" (each line takes the person to the field) */
.summary {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1.5px solid var(--danger);
  border-left-width: 6px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.summary-title { margin: 0 0 4px; font-size: 16px; color: var(--danger-ink); }
.summary-list { margin: 0; padding: 0; list-style: none; }
.summary-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--danger-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* The bar with Back, Next and Submit Report */
.actionbar {
  display: flex;
  gap: 10px;
  margin: 8px -16px 0;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}
body .container .actionbar .btn { width: auto; margin-top: 0; }
body .container .actionbar .btn.wide { flex: 1; }
.btn-ghost { background-color: #fff; color: var(--blue-700); border-color: var(--blue-700); }
.btn-ghost:hover { background-color: var(--blue-50); color: var(--blue-700); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body .container .btn.full { width: 100%; }
.wide { flex: 1; }
.linkbtn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--blue-700);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Step 1: evidence. "Take photo" (camera input), "Choose files" (the picker); both add to one list */
.addrow { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 6px 0 0; }
/* ux2 fix1: "Choose files", "Take photo" and "Add signed form" are <label>s (content-box by default): border-box keeps
   width 100% inside the column (402 px at a 390 px viewport before), no side margin */
body .container .btn.cam { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 56px; margin: 0; }
body .container .file-upload-label.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 2px solid var(--blue-700);
  background-color: #fff;
  color: var(--blue-700);
  text-align: center;
}
body .container .file-upload-label.drag-over { background-color: var(--blue-50); }
/* ux2 fix1: body .container input.vh-input outranks the base input rule (0,2,1) for a camera input outside .file-upload */
.file-upload input.vh-input,
body .container input.vh-input,
.vh-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
}
.vh-input:focus-visible + label { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.photo-hint { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.meter { margin: 14px 0 8px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.meter-bar {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 6px;
  border: 0;
  border-radius: 4px;
  background: #c4ccd8;
  color: var(--blue-700);
  accent-color: var(--blue-700);
  -webkit-appearance: none;
  appearance: none;
}
.meter-bar::-webkit-progress-bar { background: #c4ccd8; border-radius: 4px; }
.meter-bar::-webkit-progress-value { background: var(--blue-700); border-radius: 4px; }
.meter-bar::-moz-progress-bar { background: var(--blue-700); border-radius: 4px; }
.files {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
body .container .files .file-item-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 64px;
  margin: 0;
  padding: 8px 6px 8px 12px;
  border-radius: 0;
  background: #fff;
}
body .container .files .file-item-row + .file-item-row { border-top: 1px solid var(--line); }
.file { color: var(--ink); }
.thumb {
  flex: none;
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.t-img { background: #1f4670; }
.t-vid { background: #1d2433; }
.t-pdf { background: #b42318; }
.t-doc { background: #0056b3; }
.fmeta { flex: 1; min-width: 0; }
.fname { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.fsub { display: block; color: var(--ink-soft); font-size: 13px; overflow-wrap: anywhere; }
body .container .wit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
body .container .wit.on { color: var(--blue-700); }
.wit-box { width: 22px; height: 22px; margin: 0; accent-color: #0056b3; }
.wit-lock { display: block; color: var(--ink-soft); font-size: 13px; }
body .container .files .file-remove {
  flex: none;
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  color: var(--ink-soft);
  font-size: 18px;
}
.rm { cursor: pointer; }
.file-note { margin-top: 8px; color: var(--ink-soft); font-size: 14px; }

/* Step 2: "When did it happen?" chips (44 px; they fill only when tapped) */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 6px; }
.chipbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border: 1.5px solid var(--blue-700);
  border-radius: 99px;
  background: #fff;
  color: var(--blue-700);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.chipbtn[aria-pressed="true"] { background: var(--blue-700); color: #fff; }
.chip-note:empty { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
body .container .row2 .form-group { margin-bottom: 18px; }

/* Step 3: intensity as four tap cards (D2-7); the bar colour is never the only cue, each card carries its word */
.sev { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
body .container .sev-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 12px;
  align-items: start;
  min-height: 72px;
  margin: 0;
  padding: 12px 14px 12px 18px;
  border: 1.5px solid var(--line-ctl);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  overflow: hidden;
  cursor: pointer;
}
.sev-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.l-crit::before { background: #b42318; }
.l-high::before { background: #93370d; }
.l-med::before { background: #0056b3; }
.l-low::before { background: #6b7280; }
.sev-card input { grid-row: 1 / span 3; width: 22px; height: 22px; margin: 2px 0 0; accent-color: #0056b3; }
.sev-card b { font-size: 17px; font-weight: 800; }
.what { font-size: 15px; color: var(--ink); }
.eg { font-size: 14px; color: var(--ink-soft); }
body .container .sev-card.picked,
body .container .sev-card:has(input:checked) { border: 2px solid var(--blue-700); background: var(--blue-50); }

/* Step 4: Yes/No cards and the witness box */
.choice-group { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
body .container .choice .radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--line-ctl);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
body .container .choice .radio-label.picked,
body .container .choice .radio-label:has(input:checked) { border: 2px solid var(--blue-700); background: var(--blue-50); }
.choice input { width: 22px; height: 22px; margin: 0; accent-color: #0056b3; }
body .container .witness-box {
  margin: 0 0 18px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
body .container .witness-title { margin: 0 0 4px; color: var(--ink); font-size: 16px; }
body .container .witness-lead { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; }
body .container .witness-steps { margin: 6px 0 10px; padding-left: 20px; font-size: 15px; }
.wlinks { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
body .container .witness-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

/* Step 6: one card per step, each with Change */
.review { margin: 0; }
.rev { margin: 0 0 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.rev-head { display: flex; align-items: center; justify-content: space-between; }
.rev h3 { margin: 0; font-size: 16px; }
.rev dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 0; font-size: 15px; }
.rev dt { color: var(--ink-soft); }
.rev dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; } /* ux2 fix1: the reporter's line breaks stay */
.rev-text { margin: 6px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rev-files { margin: 6px 0 0; font-size: 15px; overflow-wrap: anywhere; }

/* Sent: the form gives way to the codes, Copy both codes and Share, and what happens next */
#submitTab.is-sent #incidentForm,
#submitTab.is-sent > .subtitle { display: none; }
body .container #submitResult.success {
  margin-top: 0;
  padding: 8px 0 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: center;
  font-weight: 400;
}
.done-title { margin: 0 0 4px; color: var(--ink); font-size: 24px; font-weight: 800; }
.codes {
  margin: 0 0 12px;
  padding: 4px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.code { padding: 12px 0; }
.code + .code { border-top: 1px solid var(--line); }
.code-lbl { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
body .container .code-val {
  display: block;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .02em;
}
body .container .code-ir { color: var(--blue-700); font-size: 26px; }
.pair { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 6px; }
body .container .pair .btn { width: 100%; margin-top: 0; }
.copy-note { min-height: 20px; margin: 0 0 8px; color: var(--ok); font-size: 14px; font-weight: 600; }
.small { margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; }
.next { margin: 0 0 16px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; text-align: left; }
.next h3 { margin: 0 0 6px; font-size: 16px; }
.next ol { margin: 0; padding-left: 20px; font-size: 15px; }
.another { margin: 8px 0 0; }

/* Check status: two ways in (D2-12) */
.lookup-path { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: #dbe2ec; }
body .container .seg2 label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
body .container .seg2 label.picked,
body .container .seg2 label:has(input:checked) { background: #fff; color: var(--blue-700); }
.seg2 input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.seg2 label:focus-within { outline: 3px solid var(--blue-500); outline-offset: 2px; }

/* For departments: the hub, and the link at the foot of every screen */
.hubcard {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 16px;
  border: 1.5px solid var(--line-ctl);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.hubcard b { display: block; color: var(--blue-700); font-size: 18px; }
.hubcard span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 15px; }
.foot { color: var(--ink-soft); font-size: 12px; }
.foot p { margin: 0; }
.foot-depts { margin-bottom: 4px; }
.deptl {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--blue-700);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
body .version-text { color: var(--ink-soft); font-family: inherit; }

/* Motion: colour changes only, and none when the person asks for less */
@media (prefers-reduced-motion: no-preference) {
  .btn, .tab, .chipbtn, .sev-card, .radio-label { transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Status answer as a card with a status chip (ux-mock/design.md sections 1, 4 and 6; mock 09): CSS only, so checkStatus
   and the status class names stay as they are. The chip is the status word (the second <strong>); colour is never the only cue. */
body .container #result.status-result {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--blue-700);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
body .container #result.status-result::before { display: none; }
body .container #result.status-result strong:nth-of-type(2) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 4px 0;
  padding: 0 12px;
  border-radius: 99px;
  font-weight: 800;
}
body .container #result.status-resolved { border-left-color: var(--ok); }
body .container #result.status-resolved strong:nth-of-type(2) { background: var(--ok-bg); color: var(--ok); }
body .container #result.status-in-progress { border-left-color: var(--blue-700); }
body .container #result.status-in-progress strong:nth-of-type(2) { background: var(--blue-50); color: var(--blue-700); }
body .container #result.status-pending { border-left-color: #93370d; }
body .container #result.status-pending strong:nth-of-type(2) { background: #fffaeb; color: #93370d; }
body .container #result.status-blocked { border-left-color: var(--danger); }
body .container #result.status-blocked strong:nth-of-type(2) { background: var(--danger-bg); color: var(--danger); }
body .container #result.status-unresolved { border-left-color: var(--line-ctl); }
body .container #result.status-unresolved strong:nth-of-type(2) { background: var(--grey-bg); color: var(--ink-soft); }
/* The colour key as the same chips */
body .container .status-key { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
body .container .key-list { gap: 6px; }
body .container .key-list .flex-center { margin-top: 0; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
body .container .key-swatch { width: 10px; height: 10px; border-radius: 50%; }
body .container .key-resolved { background-color: var(--ok); }
body .container .key-in-progress { background-color: var(--blue-700); }
body .container .key-pending { background-color: #93370d; }
body .container .key-blocked { background-color: var(--danger); }
body .container .key-unresolved { background-color: var(--ink-soft); }
body .container .key-list .flex-center:has(.key-resolved) { background: var(--ok-bg); color: var(--ok); }
body .container .key-list .flex-center:has(.key-in-progress) { background: var(--blue-50); color: var(--blue-700); }
body .container .key-list .flex-center:has(.key-pending) { background: #fffaeb; color: #93370d; }
body .container .key-list .flex-center:has(.key-blocked) { background: var(--danger-bg); color: var(--danger); }
body .container .key-list .flex-center:has(.key-unresolved) { background: var(--grey-bg); color: var(--ink-soft); }
