/**
 * Underwriter Score Card v5.0
 * Jony Ive design — typography-first, minimal, precise
 */

/* ─── SCORE CARD HERO HEADER ─────────────────────────── */

.uw-sc-hero {
  padding: 0 0 32px;
}

.uw-sc-hero-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.uw-sc-hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #86868b;
  background: #f5f5f7;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

.uw-sc-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.uw-sc-hero-subtitle {
  font-size: 15px;
  color: #86868b;
  line-height: 1.6;
  margin: 0 0 24px;
  font-weight: 400;
}

.uw-sc-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.uw-sc-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.uw-sc-hero-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

.uw-sc-hero-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #aeaeb2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.uw-sc-hero-stat-divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}

/* ─── EXECUTIVE SUMMARY ──────────────────────────────── */

.uw-exec {
  margin-bottom: 28px;
}

.uw-exec-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.uw-exec-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.uw-exec-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #86868b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.uw-exec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.uw-exec-dot.ai { background: #16a34a; }
.uw-exec-dot.human { background: #3b82f6; }

.uw-exec-score {
  font-size: 42px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.uw-exec-scale {
  font-size: 18px;
  font-weight: 400;
  color: #aeaeb2;
}

.uw-exec-premium {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.uw-exec-premium.standard { color: #16a34a; }
.uw-exec-premium.low { color: #d97706; }
.uw-exec-premium.moderate { color: #ea580c; }
.uw-exec-premium.elevated { color: #ef4444; }
.uw-exec-premium.high { color: #ef4444; }
.uw-exec-premium.refer { color: #991b1b; }

.uw-exec-detail {
  font-size: 12px;
  color: #aeaeb2;
  margin-top: 4px;
}

/* Risk Level Badges */
.uw-exec-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.uw-exec-badge.low { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.uw-exec-badge.moderate { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.uw-exec-badge.high { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.uw-exec-badge.critical { background: #7f1d1d; color: #ffffff; border: 1px solid #7f1d1d; }

/* Risk Gauge */
.uw-exec-gauge {
  padding: 0 4px;
}

.uw-exec-gauge-track {
  position: relative;
  height: 6px;
  background: linear-gradient(90deg, #22c55e 0%, #84cc16 20%, #eab308 40%, #f97316 60%, #ef4444 80%, #991b1b 100%);
  border-radius: 3px;
  opacity: 0.2;
}

.uw-exec-gauge-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 2;
  transition: left 0.3s ease;
}

.uw-exec-gauge-marker.ai { background: #16a34a; }
.uw-exec-gauge-marker.human { background: #3b82f6; }

.uw-exec-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #aeaeb2;
  margin-top: 6px;
  padding: 0 2px;
}

/* ─── RED / GREEN FLAGS ──────────────────────────────── */

.uw-flags {
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
}

.uw-flags-red { border-left: 3px solid #ef4444; }
.uw-flags-green { border-left: 3px solid #22c55e; }

.uw-flags-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 12px;
}

.uw-flags-red .uw-flags-header { background: #fafafa; }
.uw-flags-green .uw-flags-header { background: #fafafa; }

.uw-flags-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.uw-flags-red .uw-flags-title { color: #ef4444; }
.uw-flags-green .uw-flags-title { color: #22c55e; }

.uw-flags-count {
  font-weight: 500;
}

.uw-flags-red .uw-flags-count { color: #ef4444; }
.uw-flags-green .uw-flags-count { color: #22c55e; }

.uw-flags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 16px 16px;
}

.uw-flag-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uw-flag-card.critical { border-left: 3px solid #dc2626; }
.uw-flag-card.high { border-left: 3px solid #f97316; }
.uw-flag-card.positive { border-left: 3px solid #22c55e; }

.uw-flag-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #f8f8f8;
  background: #fff;
}

.uw-flag-indicator {
  width: 4px;
  min-height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.uw-flag-item.critical .uw-flag-indicator { background: #dc2626; }
.uw-flag-item.high .uw-flag-indicator { background: #f97316; }
.uw-flag-item.positive .uw-flag-indicator { background: #22c55e; }

.uw-flag-content { flex: 1; min-width: 0; }

.uw-flag-text {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.4;
  margin-bottom: 4px;
}

.uw-flag-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uw-flag-score {
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  padding: 1px 8px;
  border-radius: 10px;
}

.uw-flag-tag {
  font-size: 11px;
  color: #86868b;
  font-weight: 500;
}

.uw-flag-source {
  font-size: 10px;
  color: #aeaeb2;
  background: #f5f5f7;
  padding: 1px 8px;
  border-radius: 10px;
}

/* ─── CATEGORY CARDS ─────────────────────────────────── */

.uw-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.uw-cat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.uw-cat:hover { border-color: #d1d5db; }

.uw-cat.modified {
  border-color: #93c5fd;
}

.uw-cat-fire {
  border-color: #e5e7eb;
  border-left: 3px solid #ef4444;
}

.uw-cat-fire:hover { border-color: #d1d5db; }

.uw-cat-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.uw-cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6e6e73;
}

.uw-cat-icon.fire {
  background: #ef4444;
  color: #ffffff;
}

.uw-cat-title { flex: 1; min-width: 0; }

.uw-cat-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
}

.uw-cat-meta {
  font-size: 11px;
  color: #aeaeb2;
  margin-top: 2px;
  font-weight: 500;
}

.uw-cat-header-scores {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.uw-cat-score-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 36px;
}

.uw-cat-score-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aeaeb2;
}

.uw-cat-score-num {
  font-size: 16px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.uw-cat-score-num.ai {
  color: #166534;
  background: #f0fdf4;
}

.uw-cat-score-num.human {
  color: #3b82f6;
  background: #f5f5f7;
}

.uw-cat-score-num.human.changed {
  color: #3b82f6;
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.uw-cat-risk-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.uw-cat-risk-badge.low { background: #f0fdf4; color: #166534; }
.uw-cat-risk-badge.moderate { background: #fffbeb; color: #92400e; }
.uw-cat-risk-badge.high { background: #fef2f2; color: #991b1b; }
.uw-cat-risk-badge.critical { background: #7f1d1d; color: #fff; }

.uw-cat-slider-inline {
  width: 120px;
  display: flex;
  align-items: center;
}

.uw-cat-toggle {
  color: #aeaeb2;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.uw-cat-toggle.open { transform: rotate(180deg); }

/* Key Finding Bar */
.uw-cat-finding {
  padding: 8px 20px 8px 70px;
  font-size: 12px;
  color: #6e6e73;
  border-top: 1px solid #f0f0f0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expandable Body */
.uw-cat-body {
  display: none;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.uw-cat-body.open { display: block; }

.uw-cat-evidence-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #86868b;
  margin-bottom: 12px;
}

.uw-cat-factors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.uw-cat-factor {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.uw-cat-factor.negative { background: #fafafa; border-left: 3px solid #ef4444; }
.uw-cat-factor.positive { background: #fafafa; border-left: 3px solid #22c55e; }
.uw-cat-factor.neutral { background: #fafafa; border-left: 3px solid #d1d5db; }

.uw-cat-factor-name {
  font-weight: 600;
  color: #1d1d1f;
  white-space: nowrap;
  flex-shrink: 0;
}

.uw-cat-factor-desc {
  color: #6e6e73;
}

.uw-cat-no-data {
  font-size: 12px;
  color: #aeaeb2;
  padding: 8px 0;
}

.uw-cat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.uw-source-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #f5f5f7;
  color: #86868b;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}

/* ─── RANGE SLIDERS ──────────────────────────────────── */

.uw-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.uw-range::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 50%, #ef4444 100%);
  border-radius: 2px;
  opacity: 0.25;
}

.uw-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  cursor: grab;
  margin-top: -6px;
}

.uw-range::-webkit-slider-thumb:active { cursor: grabbing; box-shadow: 0 1px 8px rgba(59, 130, 246, 0.3); }

.uw-range::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 50%, #ef4444 100%);
  border-radius: 2px;
  opacity: 0.25;
}

.uw-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  cursor: grab;
}

/* ─── NOTE INPUTS ────────────────────────────────────── */

.uw-note-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  height: 40px;
  color: #1d1d1f;
  box-sizing: border-box;
  transition: border-color 0.15s;
  background: #fafafa;
}

.uw-note-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
  background: #fff;
}

.uw-note-input::placeholder { color: #aeaeb2; }

.uw-cat-note-area {
  padding: 12px 20px 16px;
  border-top: 1px solid #f0f0f0;
}

/* ─── FIRE RISK SECTION ──────────────────────────────── */

.uw-fire-grid {
  border-top: 1px solid #f0f0f0;
}

.uw-fire-grid-head {
  display: grid;
  grid-template-columns: 1fr 50px 160px 50px;
  gap: 8px;
  padding: 8px 20px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #86868b;
}

.uw-fire-row {
  display: grid;
  grid-template-columns: 1fr 50px 160px 50px;
  gap: 8px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}

.uw-fire-row:last-of-type { border-bottom: none; }
.uw-fire-row:hover { background: #fafafa; }
.uw-fire-row.modified { background: #f5f5f7; }
.uw-fire-row.modified:hover { background: #f0f0f0; }
.uw-fire-row.unavailable { opacity: 0.45; }

.uw-fire-row.negative { border-left: 3px solid #ef4444; }
.uw-fire-row.positive { border-left: 3px solid #22c55e; }
.uw-fire-row.neutral { border-left: 3px solid #d1d5db; }

.uw-fire-row-info {
  min-width: 0;
  cursor: pointer;
}

.uw-fire-row-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
}

.uw-fire-row-evidence {
  font-size: 11px;
  color: #6e6e73;
  margin-top: 1px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uw-fire-row-source {
  font-size: 10px;
  color: #aeaeb2;
  margin-top: 1px;
}

.uw-fire-row-ai {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  background: #f0fdf4;
  border-radius: 6px;
  padding: 3px 0;
}

.uw-fire-row-ai.na {
  color: #aeaeb2;
  background: #f5f5f7;
  font-weight: 400;
}

.uw-fire-row-slider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.uw-fire-row-uw {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  background: #f5f5f7;
  border-radius: 6px;
  padding: 3px 0;
}

.uw-fire-row-uw.changed {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.uw-na {
  font-size: 11px;
  color: #aeaeb2;
  text-align: center;
  display: block;
}

.uw-fire-row-note {
  grid-column: 1 / -1;
  padding: 4px 0 8px 20px;
}

.uw-fire-row-note .uw-note-input {
  height: 32px;
  font-size: 11px;
}

/* ─── SUBMIT SECTION ─────────────────────────────────── */

.uw-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 24px;
}

.uw-submit-info { flex: 1; }

.uw-submit-count {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.uw-submit-hint {
  font-size: 12px;
  color: #86868b;
  margin-top: 2px;
}

.uw-submit-actions {
  display: flex;
  gap: 10px;
}

.uw-btn-reset {
  padding: 10px 20px;
  background: #fff;
  color: #86868b;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.uw-btn-reset:hover { border-color: #d1d5db; color: #1d1d1f; }

.uw-btn-submit {
  padding: 10px 28px;
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  letter-spacing: 0.02em;
}

.uw-btn-submit:hover:not(:disabled) { opacity: 0.85; }

.uw-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── APPENDIX ───────────────────────────────────────── */

.uw-appendix {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 32px;
}

.uw-appendix-header {
  background: #1d1d1f;
  color: #fff;
  padding: 24px 28px;
}

.uw-appendix-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.uw-appendix-logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3b82f6;
}

.uw-appendix-header-title {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  text-align: center;
  letter-spacing: -0.01em;
}

.uw-appendix-header-time {
  font-size: 11px;
  opacity: 0.6;
}

.uw-appendix-header-sub {
  font-size: 12px;
  opacity: 0.5;
  text-align: center;
}

.uw-appendix-body {
  padding: 28px;
  background: #fff;
}

/* Appendix Overview (new layout) */
.uw-apx-overview {
  margin-bottom: 28px;
}

.uw-apx-overview-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.uw-apx-score-block {
  text-align: center;
  padding: 24px 32px;
  border-radius: 16px;
  min-width: 180px;
}

.uw-apx-score-block.ai {
  background: #fafafa;
  border: 1px solid #e5e7eb;
}

.uw-apx-score-block.human {
  background: #fafafa;
  border: 1px solid #e5e7eb;
}

.uw-apx-score-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #86868b;
  margin-bottom: 8px;
}

.uw-apx-score-val {
  font-size: 40px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.uw-apx-score-unit {
  font-size: 18px;
  font-weight: 400;
  color: #aeaeb2;
}

.uw-apx-premium-label {
  font-size: 12px;
  font-weight: 600;
  color: #86868b;
  margin-top: 8px;
}

.uw-apx-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.uw-apx-arrow-diff {
  font-size: 14px;
  font-weight: 700;
  color: #86868b;
}

.uw-apx-arrow-diff.higher { color: #ef4444; }
.uw-apx-arrow-diff.lower { color: #22c55e; }

/* Appendix section titles */
.uw-apx-section {
  margin-bottom: 24px;
}

.uw-apx-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #86868b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.uw-apx-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uw-apx-narrative p {
  font-size: 14px;
  color: #1d1d1f;
  line-height: 1.7;
  margin: 0 0 12px;
}

.uw-apx-narrative p:last-child { margin-bottom: 0; }

/* Keep table styles updated */
.uw-appendix-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.uw-appendix-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #86868b;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

.uw-appendix-table td {
  padding: 10px 14px;
  font-size: 13px;
  color: #1d1d1f;
  border-bottom: 1px solid #f0f0f0;
}

.uw-appendix-table tr.modified td { background: #f5f5f7; }

.uw-appendix-table .higher { color: #ef4444; font-weight: 600; }
.uw-appendix-table .lower { color: #22c55e; font-weight: 600; }

.uw-appendix-table .note-cell {
  font-size: 12px;
  color: #86868b;
  max-width: 200px;
}

.uw-appendix-table .evidence-cell {
  font-size: 11px;
  color: #86868b;
  max-width: 180px;
}

.uw-appendix-note {
  padding: 10px 14px;
  background: #fafafa;
  border-left: 3px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.5;
}

.uw-appendix-note strong { color: #1d1d1f; }

/* ─── RESPONSIVE ─────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════
   COMPREHENSIVE UNDERWRITER REPORT (uw-rpt-*)
   The definitive human-approved risk document
   ═══════════════════════════════════════════════════════ */

.uw-rpt {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 32px;
  background: #fff;
}

/* Header */
.uw-rpt-header {
  background: #1d1d1f;
  color: #fff;
  padding: 28px 32px 24px;
}

.uw-rpt-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.uw-rpt-logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3b82f6;
}

.uw-rpt-header-time {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.uw-rpt-header-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.uw-rpt-header-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

/* Body */
.uw-rpt-body {
  padding: 32px;
}

/* Section headers with number */
.uw-rpt-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.uw-rpt-section:first-child { margin-top: 0; }

.uw-rpt-section-num {
  font-size: 11px;
  font-weight: 700;
  color: #aeaeb2;
  font-variant-numeric: tabular-nums;
}

.uw-rpt-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Executive Summary */
.uw-rpt-exec {
  margin-bottom: 8px;
}

.uw-rpt-exec-scores {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.uw-rpt-exec-block {
  text-align: center;
  padding: 20px 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

.uw-rpt-exec-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #86868b;
  margin-bottom: 8px;
}

.uw-rpt-exec-val {
  font-size: 36px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.uw-rpt-exec-unit {
  font-size: 16px;
  font-weight: 400;
  color: #aeaeb2;
}

.uw-rpt-exec-premium {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  margin-bottom: 8px;
}

.uw-rpt-exec-meta {
  font-size: 11px;
  color: #aeaeb2;
  margin-top: 4px;
}

.uw-rpt-exec-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.uw-rpt-exec-diff {
  font-size: 13px;
  font-weight: 700;
  color: #aeaeb2;
}

.uw-rpt-exec-diff.higher { color: #ef4444; }
.uw-rpt-exec-diff.lower { color: #22c55e; }

/* Score Comparison Table */
.uw-rpt-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}

.uw-rpt-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #86868b;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

.uw-rpt-table td {
  padding: 10px 14px;
  font-size: 13px;
  color: #1d1d1f;
  border-bottom: 1px solid #f0f0f0;
}

.uw-rpt-table tr.modified td { background: #f5f5f7; }
.uw-rpt-table .higher { color: #ef4444; font-weight: 600; }
.uw-rpt-table .lower { color: #22c55e; font-weight: 600; }
.uw-rpt-table .note-cell { font-size: 12px; color: #86868b; max-width: 200px; }
.uw-rpt-table .evidence-cell { font-size: 11px; color: #86868b; max-width: 200px; }

/* Alerts */
.uw-rpt-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.uw-rpt-alert {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  background: #fafafa;
  border-radius: 12px;
  align-items: flex-start;
}

.uw-rpt-alert-bar {
  width: 3px;
  min-height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.uw-rpt-alert.critical .uw-rpt-alert-bar { background: #ef4444; }
.uw-rpt-alert.high .uw-rpt-alert-bar { background: #f97316; }

.uw-rpt-alert-body { flex: 1; min-width: 0; }

.uw-rpt-alert-text {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.4;
  margin-bottom: 3px;
}

.uw-rpt-alert-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uw-rpt-alert-score {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  background: #fef2f2;
  padding: 1px 8px;
  border-radius: 10px;
}

.uw-rpt-alert-cat {
  font-size: 11px;
  color: #86868b;
  font-weight: 500;
}

.uw-rpt-alert-src {
  font-size: 10px;
  color: #aeaeb2;
  background: #f5f5f7;
  padding: 1px 8px;
  border-radius: 10px;
}

/* Positives */
.uw-rpt-positives {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.uw-rpt-positive {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  align-items: center;
}

.uw-rpt-positive-bar {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: #22c55e;
  flex-shrink: 0;
}

.uw-rpt-positive-body { flex: 1; min-width: 0; }

.uw-rpt-positive-text {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
  line-height: 1.3;
}

.uw-rpt-positive-cat {
  font-size: 11px;
  color: #aeaeb2;
}

/* Category Deep-Dive Cards */
.uw-rpt-cat {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.uw-rpt-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
}

.uw-rpt-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  flex: 1;
}

.uw-rpt-cat-scores {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.uw-rpt-cat-ai {
  color: #166534;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 6px;
}

.uw-rpt-cat-arrow {
  color: #aeaeb2;
  font-weight: 400;
  font-size: 12px;
}

.uw-rpt-cat-uw {
  color: #3b82f6;
  background: #f5f5f7;
  padding: 2px 8px;
  border-radius: 6px;
}

.uw-rpt-cat-uw.changed {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.uw-rpt-cat-conf {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 8px;
}

.uw-rpt-cat-conf.high { color: #166534; background: #f0fdf4; }
.uw-rpt-cat-conf.moderate { color: #92400e; background: #fffbeb; }
.uw-rpt-cat-conf.low { color: #9a3412; background: #fff7ed; }
.uw-rpt-cat-conf.none { color: #aeaeb2; background: #f5f5f7; }

.uw-rpt-cat-factors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
  padding: 8px 12px;
}

.uw-rpt-factor {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.uw-rpt-factor.negative { background: #fafafa; border-left: 3px solid #ef4444; }
.uw-rpt-factor.positive { background: #fafafa; border-left: 3px solid #22c55e; }
.uw-rpt-factor.neutral { background: #fafafa; border-left: 3px solid #d1d5db; }

.uw-rpt-factor-name {
  font-weight: 600;
  color: #1d1d1f;
  white-space: nowrap;
  flex-shrink: 0;
}

.uw-rpt-factor-desc { color: #6e6e73; }

.uw-rpt-cat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 12px 8px;
}

.uw-rpt-src-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #f5f5f7;
  color: #86868b;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}

.uw-rpt-cat-note {
  padding: 8px 16px 10px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.5;
}

.uw-rpt-cat-note strong { color: #3b82f6; }

/* Policy Conditions */
.uw-rpt-conditions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.uw-rpt-condition {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  background: #fafafa;
  border-radius: 12px;
  align-items: center;
}

.uw-rpt-condition-bar {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}

.uw-rpt-condition.refer .uw-rpt-condition-bar { background: #991b1b; }
.uw-rpt-condition.high .uw-rpt-condition-bar { background: #ef4444; }
.uw-rpt-condition.watch .uw-rpt-condition-bar { background: #f59e0b; }

.uw-rpt-condition-text {
  font-size: 13px;
  color: #1d1d1f;
  line-height: 1.4;
}

/* Underwriter Notes */
.uw-rpt-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.uw-rpt-note {
  padding: 10px 14px;
  background: #fafafa;
  border-left: 3px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.5;
}

.uw-rpt-note strong { color: #1d1d1f; }

/* Risk Narrative */
.uw-rpt-narrative {
  margin-bottom: 8px;
}

.uw-rpt-narrative p {
  font-size: 14px;
  color: #1d1d1f;
  line-height: 1.7;
  margin: 0 0 12px;
}

.uw-rpt-narrative p:last-child { margin-bottom: 0; }

/* Data Provenance */
.uw-rpt-provenance {
  margin-bottom: 8px;
}

.uw-rpt-provenance-count {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.uw-rpt-provenance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Footer */
.uw-rpt-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.uw-rpt-footer-logo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aeaeb2;
  margin-bottom: 4px;
}

.uw-rpt-footer-text {
  font-size: 11px;
  color: #aeaeb2;
  line-height: 1.5;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 768px) {
  .uw-sc-hero-title { font-size: 24px; }
  .uw-sc-hero-stats { flex-direction: column; gap: 12px; }
  .uw-sc-hero-stat-divider { width: 32px; height: 1px; }
  .uw-exec-cards { grid-template-columns: 1fr; }
  .uw-cat-header { flex-wrap: wrap; gap: 10px; }
  .uw-cat-header-scores { width: 100%; justify-content: space-between; }
  .uw-cat-slider-inline { width: 80px; }
  .uw-cat-factors { grid-template-columns: 1fr; }
  .uw-fire-grid-head { display: none; }
  .uw-fire-row { grid-template-columns: 1fr; gap: 6px; }
  .uw-fire-row-ai, .uw-fire-row-uw { display: inline-block; width: auto; padding: 3px 12px; }
  .uw-fire-row-slider { width: 100%; }
  .uw-submit { flex-direction: column; text-align: center; }
  .uw-rpt-exec-scores { grid-template-columns: 1fr; gap: 12px; }
  .uw-rpt-exec-arrow { transform: rotate(90deg); }
  .uw-rpt-header-top { flex-direction: column; text-align: center; }
  .uw-rpt-cat-header { flex-wrap: wrap; gap: 8px; }
  .uw-rpt-cat-factors { grid-template-columns: 1fr; }
  .uw-rpt-body { padding: 20px; }
}
