@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;500;600;700&display=swap');

.report-container *, .report-container *::before, .report-container *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --report-amber: #d4a017;
  --report-amber-light: #f5e6b8;
  --report-green: #1a7a4a;
  --report-green-light: #d4edda;
  --report-blue: #064a8b;
  --report-blue-light: #dce8f5;
  --report-charcoal: #3d4554;
  --report-text: #444;
  --report-text-light: #6b7a8d;
  --report-header-bg: #f0f2f7;
  --report-border: #dde2ea;
  --report-section-bg: #f7f8fb;
  --report-max-width: 1100px;
  --report-shadow: 0 4px 32px rgba(6, 74, 139, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  --report-shadow-hover: 0 8px 40px rgba(6, 74, 139, 0.12), 0 2px 8px rgba(0,0,0,0.06);
}

.report-container {
  font-family: "Fira Sans", sans-serif;
  color: var(--report-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.report-container {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: var(--report-max-width);
  margin: 10px auto;
  margin-top: 6.5rem;
  background: #fff;
  box-shadow: var(--report-shadow);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.report-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
}

.report-watermark img {
  width: 400px;
  height: auto;
}

.report-container > *:not(.report-watermark) {
  position: relative;
  z-index: 1;
}

.report-container:hover {
  box-shadow: var(--report-shadow-hover);
}

.report-top-bars {
  display: flex;
  height: 5px;
}

.report-top-bars span:nth-child(1) {
  flex: 1;
  background: linear-gradient(90deg, #c89a10, var(--report-amber));
}

.report-top-bars span:nth-child(2) {
  flex: 1;
  background: linear-gradient(90deg, var(--report-green), #22915a);
}

.report-top-bars span:nth-child(3) {
  flex: 1;
  background: linear-gradient(90deg, #0862b4, var(--report-blue));
}

.report-header {
  background: linear-gradient(180deg, #f4f6fb 0%, #ebeef5 100%);
  padding: 14px 36px 12px;
  text-align: center;
  border-bottom: 1px solid var(--report-border);
  position: relative;
}

.report-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 36px;
  right: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--report-border), transparent);
}

.report-header h1 {
  font-size: 21px;
  font-weight: 700;
  color: #1a1f2e;
  margin: 0 0 5px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.report-header .report-subtitle {
  font-size: 13px;
  color: var(--report-text-light);
  margin: 0;
  font-weight: 400;
}

.report-header .report-meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--report-text-light);
  flex-wrap: wrap;
}

.report-header .report-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 500;
}

.report-header .org-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  border: 1px solid rgba(212, 160, 23, 0.2);
  font-size: 10px;
  font-weight: 600;
  color: var(--report-amber);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.report-header .org-badge img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.report-header .bulletin-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--report-amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.report-header .bulletin-btn:hover {
  background: #b8880f;
}

.report-body {
  display: flex;
  flex-direction: column;
  padding: 16px 36px;
  flex: 1;
  color: var(--report-text);
}

.report-params {
  background: linear-gradient(135deg, #f8f9fc 0%, #f3f5fa 100%);
  border: 1px solid var(--report-border);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.report-params::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--report-amber), var(--report-green), var(--report-blue));
  opacity: 0.6;
}

.report-params-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--report-charcoal);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-params-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--report-blue);
  border-radius: 2px;
}

.report-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .report-params-grid {
    grid-template-columns: 1fr;
  }
}

.report-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--report-text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}

.report-select {
  width: 100%;
  height: 30px;
  background: #fff;
  border: 1px solid var(--report-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  color: var(--report-text);
  padding: 0 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  cursor: pointer;
  appearance: auto;
}

.report-select:hover {
  border-color: #b8c4d4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.report-select:focus {
  border-color: var(--report-amber);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
  outline: none;
}

.cycle-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cycle-pill {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--report-border);
  background: #f3f5f8;
  color: var(--report-text-light);
  transition: all 0.15s ease;
}

.cycle-pill:hover {
  background: #e8ecf2;
}

.cycle-pill.active {
  background: var(--report-amber);
  color: #fff;
  border-color: var(--report-amber);
  box-shadow: 0 1px 4px rgba(212, 160, 23, 0.35);
}

.cycle-fields {
  display: none;
  gap: 8px;
  margin-top: 8px;
}

.cycle-fields.active {
  display: grid;
}

.cycle-fields-2 { grid-template-columns: 1fr 1fr; }
.cycle-fields-3 { grid-template-columns: 1fr 1fr 1fr; }
.cycle-fields-1 { grid-template-columns: 1fr; }

.date-range-box {
  border-top: 1px solid var(--report-border);
  padding-top: 8px;
  margin-top: 8px;
}

.date-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 4px;
}

.date-range-arrow {
  display: flex;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
  margin: 2px 0;
}

.area-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.area-type-card {
  padding: 7px 12px;
  border: 1px solid var(--report-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: var(--report-text);
  text-align: left;
  transition: all 0.15s ease;
}

.area-type-card:hover {
  border-color: #b0bcc8;
  background: #f8f9fc;
}

.area-type-card.active {
  border-color: var(--report-amber);
  background: var(--report-amber);
  color: #fff;
  box-shadow: 0 2px 8px rgba(212, 160, 23, 0.3);
}

.admin-selects {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

@media (max-width: 768px) {
  .admin-selects {
    grid-template-columns: 1fr;
  }
}

.aoi-hint {
  font-size: 11px;
  color: var(--report-text-light);
  margin-top: 8px;
}

.report-generate-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  margin-bottom: 4px;
  position: relative;
}

.report-generate-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--report-border), transparent);
}

.report-generate-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--report-border), transparent);
}

.generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--report-amber) 0%, #b8880f 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.35);
  transition: all 0.2s ease;
}

.generate-btn:hover {
  box-shadow: 0 6px 24px rgba(212, 160, 23, 0.45);
  transform: translateY(-1px);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-hint {
  font-size: 12px;
  color: var(--report-text-light);
  margin-top: 10px;
}

.report-widget {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eaecf2;
  animation: slide-up-fade 0.4s ease forwards;
}

.report-widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.report-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0f2f7 0%, #e8ebf3 100%);
  border-left: 4px solid var(--report-amber);
  padding: 10px 16px;
  margin-bottom: 18px;
  border-radius: 0 4px 4px 0;
  transition: background 0.2s ease;
}

.report-widget-header:hover {
  background: linear-gradient(135deg, #ebeef5 0%, #e3e6f0 100%);
}

.report-widget-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--report-charcoal);
  margin: 0;
}

.report-widget-header p {
  font-size: 11px;
  color: var(--report-text-light);
  margin: 0;
}

.report-widget-content {
  padding: 2px 4px;
}

.report-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 768px) {
  .report-metrics-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.report-metric-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfd 100%);
  border: 1px solid var(--report-border);
  border-radius: 8px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.report-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--report-amber), var(--report-green));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.report-metric-card:hover {
  border-color: #c8d0dc;
  box-shadow: 0 4px 16px rgba(6, 74, 139, 0.08);
  transform: translateY(-1px);
}

.report-metric-card:hover::before {
  opacity: 1;
}

.report-metric-card .metric-title {
  font-size: 11px;
  color: var(--report-text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.report-metric-card .metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--report-charcoal);
}

.report-metric-card .metric-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--report-text-light);
  margin-left: 4px;
}

.report-metric-card .metric-range {
  font-size: 10px;
  color: var(--report-text-light);
  margin-top: 6px;
}

.report-chart-container {
  border: 1px solid var(--report-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: all 0.25s ease;
}

.report-chart-container:hover {
  border-color: #c8d0dc;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.report-chart-header {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--report-charcoal);
  background: linear-gradient(135deg, #f7f8fb 0%, #f2f4f9 100%);
  border-bottom: 1px solid var(--report-border);
  letter-spacing: -0.1px;
}

.report-chart-body {
  padding: 16px;
  position: relative;
  height: 320px;
  overflow: hidden;
}

.chart-toolbar {
  display: flex;
  gap: 2px;
  align-items: center;
}

.chart-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--report-text-light);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.chart-tool-btn:hover {
  background: rgba(212, 160, 23, 0.12);
  color: var(--report-amber);
}


.report-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .report-charts-grid {
    grid-template-columns: 1fr;
  }
}

.report-map-container {
  border: 1px solid var(--report-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.report-map-container:hover {
  border-color: #c0cad8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.report-map-header {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--report-charcoal);
  background: linear-gradient(135deg, #f7f8fb 0%, #f0f2f7 100%);
  border-bottom: 1px solid var(--report-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-map-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--report-green);
  flex-shrink: 0;
}

.report-map-body {
  height: 400px;
  position: relative;
}

.report-map-figure {
  border: 1px solid var(--report-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: all 0.25s ease;
}

.report-map-figure:hover {
  border-color: #c0cad8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.map-figure-header {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--report-charcoal);
  background: linear-gradient(135deg, #f7f8fb 0%, #f0f2f7 100%);
  border-bottom: 1px solid var(--report-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-figure-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-figure-body {
  height: 300px;
  position: relative;
}

.map-figure-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.map-figure-furniture {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 6px 10px;
  font-size: 10px;
  color: var(--report-text-light);
  border-top: 1px solid var(--report-border);
}

.map-figure-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-figure-scale-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.scale-bar-line {
  height: 3px;
  background: var(--report-charcoal);
  border-left: 1px solid var(--report-charcoal);
  border-right: 1px solid var(--report-charcoal);
  min-width: 30px;
}

.scale-bar-label {
  font-size: 9px;
  color: var(--report-text-light);
}

.map-figure-attribution {
  padding: 3px 10px;
  font-size: 9px;
  color: var(--report-text-light);
  background: #f8f9fc;
  border-top: 1px solid var(--report-border);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-label {
  white-space: nowrap;
}

.report-maps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .report-maps-grid {
    grid-template-columns: 1fr;
  }
}

.report-table-container {
  border: 1px solid var(--report-border);
  border-radius: 8px;
  overflow: hidden;
}

.report-table-container table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.report-table-container thead tr {
  background: linear-gradient(135deg, #f0f2f7 0%, #e8ebf3 100%);
}

.report-table-container thead th {
  color: var(--report-charcoal);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 14px;
  text-align: left;
}

.report-table-container tbody tr {
  transition: background 0.15s ease;
}

.report-table-container tbody tr:nth-child(even) {
  background: #fafbfd;
}

.report-table-container tbody tr:hover {
  background: #f0f4fa;
}

.report-table-container td {
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid #eef0f4;
}

.report-footer {
  background: linear-gradient(135deg, #1e2430 0%, #262d3c 100%);
  color: #b8c1cf;
  padding: 14px 36px;
  font-size: 12px;
  position: relative;
  margin-top: auto;
  border-radius: 0 0 4px 4px;
}

.report-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--report-amber), var(--report-green), var(--report-blue));
}

.report-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.report-footer h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}

.report-footer p {
  margin: 0;
  color: #aaa;
  font-size: 11px;
}

.footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--report-amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.footer-action-btn:hover {
  background: #b8880f;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.report-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--report-border), transparent);
  margin: 28px 0;
}

.report-expert-card {
  border: 1px solid var(--report-border);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
  transition: box-shadow 0.2s;
}

.report-expert-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.report-expert-card .expert-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--report-charcoal);
}

.report-expert-card .expert-name {
  font-size: 11px;
  color: var(--report-text-light);
}

.report-expert-card .expert-comment {
  font-size: 13px;
  color: var(--report-text);
  margin-top: 8px;
  line-height: 1.6;
}

.login-box {
  max-width: 340px;
  margin: 0 auto;
  padding: 40px 0;
  text-align: center;
}

.login-box h2 {
  font-size: 18px;
  color: var(--report-charcoal);
  margin-bottom: 8px;
}

.login-box p {
  font-size: 13px;
  color: var(--report-text-light);
  margin-bottom: 20px;
}

.login-box .form-group {
  text-align: left;
  margin-bottom: 12px;
}

.login-box input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--report-border);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
}

.login-box input:focus {
  border-color: var(--report-amber);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 10px;
  background: var(--report-amber);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
}

.login-box button:hover {
  background: #b8880f;
}

.login-error {
  color: #dc3545;
  font-size: 12px;
  margin-bottom: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--report-text-light);
  text-decoration: none;
  font-size: 12px;
  margin-top: 16px;
}

.back-link:hover {
  color: var(--report-charcoal);
}

.analysis-sections {
  display: none;
}

.analysis-sections.visible {
  display: block;
}

.rich-text p { margin-bottom: 8px; }
.rich-text ul, .rich-text ol { padding-left: 20px; margin-bottom: 8px; }
.rich-text li { margin-bottom: 4px; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--report-charcoal);
  margin: 8px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@keyframes slide-up-fade {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media print {
  body { background: #fff; }
  .report-container { box-shadow: none; margin: 0; max-width: 100%; }
  .report-params, .generate-btn, .footer-actions { display: none; }
}

/* ── Severity tokens ───────────────────────────────────────────────
   Every report-container picks up CSS variables that match the round's
   highest severity, so descendants (hero strip, top bars, widget badges)
   theme themselves without per-element view logic. */
.report-container.severity-extreme {
  --severity-color: #dc2626;
  --severity-tint: rgba(220, 38, 38, 0.08);
  --severity-glow: rgba(220, 38, 38, 0.18);
}
.report-container.severity-severe {
  --severity-color: #f97316;
  --severity-tint: rgba(249, 115, 22, 0.08);
  --severity-glow: rgba(249, 115, 22, 0.18);
}
.report-container.severity-moderate {
  --severity-color: #fbbf24;
  --severity-tint: rgba(251, 191, 36, 0.10);
  --severity-glow: rgba(251, 191, 36, 0.22);
}

/* When the round is severe or extreme, the decorative tri-color top bar
   becomes a single severity-color stripe — visual cue that this is not a
   routine week. Moderate keeps the standard tri-color (warning, not alarm). */
.report-container.severity-extreme .report-top-bars,
.report-container.severity-severe .report-top-bars {
  height: 6px;
  background: linear-gradient(90deg,
    var(--severity-color),
    var(--severity-color) 38%,
    rgba(255,255,255,0.55) 50%,
    var(--severity-color) 62%,
    var(--severity-color));
  background-size: 220% 100%;
  animation: severityShimmer 4s ease-in-out infinite;
}
.report-container.severity-extreme .report-top-bars span,
.report-container.severity-severe .report-top-bars span {
  display: none;
}

@keyframes severityShimmer {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 0%; }
}

/* ── Hero metrics strip ────────────────────────────────────────────
   Sits between the report header and the body. Four KPI tiles plus an
   alert pill that summarises the round's dominant severity. */
.report-hero {
  padding: 16px 36px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border-bottom: 1px solid var(--report-border);
  position: relative;
}

.report-hero.severity-extreme,
.report-hero.severity-severe,
.report-hero.severity-moderate {
  background: linear-gradient(180deg, var(--severity-tint) 0%, #f7f8fb 100%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  background: #fff;
  border: 1px solid var(--pill-color, #16a34a);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--report-charcoal);
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hero-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-color, #16a34a);
  box-shadow:
    0 0 0 3px var(--severity-glow, rgba(22, 163, 74, 0.18));
  animation: pillPulse 2.4s ease-in-out infinite;
}

.report-hero.severity-extreme .pill-dot,
.report-hero.severity-severe .pill-dot {
  animation-duration: 1.6s;
}

@keyframes pillPulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.2); opacity: 0.7; }
}

.hero-pill .pill-label {
  text-transform: uppercase;
  color: var(--report-text-light);
  font-weight: 500;
  letter-spacing: 0.6px;
}

.hero-pill .pill-value {
  color: var(--pill-color, #16a34a);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.report-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 760px) {
  .report-hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-tile {
  background: #fff;
  border: 1px solid var(--report-border);
  border-radius: 6px;
  padding: 12px 14px 12px 18px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 74, 139, 0.08);
}

.metric-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--report-blue);
}

.metric-tile:nth-child(1)::before { background: var(--report-blue); }
.metric-tile:nth-child(2)::before { background: var(--report-amber); }
.metric-tile:nth-child(3)::before { background: var(--severity-color, var(--report-green)); }
.metric-tile:nth-child(4)::before { background: var(--report-green); }

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--report-charcoal);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
}

.metric-value.metric-dates {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.metric-divisor {
  font-size: 14px;
  font-weight: 500;
  color: var(--report-text-light);
  margin-left: 2px;
}

.metric-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--report-text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

@media print {
  .report-hero { padding: 12px 24px 16px; }
  .metric-tile { box-shadow: none; }
  .hero-pill .pill-dot { animation: none; }
  .report-container.severity-extreme .report-top-bars,
  .report-container.severity-severe .report-top-bars { animation: none; }
}
