.period-analytics-phase5 {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(73, 91, 112, 0.18);
  border-radius: 18px;
  background: #f7f9fc;
  color: #1f2a37;
}

.period-phase5-heading,
.period-phase5-toolbar,
.period-phase5-card > header,
.period-phase5-context,
.period-phase5-context > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.period-phase5-heading {
  align-items: flex-start;
}

.period-phase5-heading h3,
.period-phase5-card h4 {
  margin: 4px 0 5px;
  color: #152234;
}

.period-phase5-heading p,
.period-phase5-card header span,
.period-phase5-card > p,
.period-phase5-context p,
.period-phase5-capability,
.period-phase5-toolbar-note {
  margin: 0;
  color: #627083;
  font-size: 12px;
  line-height: 1.6;
}

.period-phase5-eyebrow {
  color: #1769aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.period-phase5-toolbar {
  justify-content: flex-start;
  margin: 18px 0 14px;
  padding: 12px;
  border: 1px solid rgba(73, 91, 112, 0.14);
  border-radius: 12px;
  background: #fff;
}

.period-phase5-toolbar label {
  display: grid;
  flex: 1 1 420px;
  max-width: 650px;
  gap: 5px;
  color: #536174;
  font-size: 11px;
  font-weight: 700;
}

.period-phase5-toolbar select {
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid #c9d2de;
  border-radius: 8px;
  background: #fff;
  color: #223044;
}

.period-phase5-toolbar-note {
  margin-left: auto;
  text-align: right;
}

.period-phase5-state {
  padding: 30px 18px;
  border: 1px dashed #bdc8d6;
  border-radius: 12px;
  background: #fff;
  color: #627083;
  text-align: center;
}

.period-phase5-state strong {
  display: block;
  margin-bottom: 5px;
  color: #243247;
}

.period-phase5-state p {
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

.period-phase5-state.error {
  border-color: #d7a2a2;
  background: #fff7f7;
}

.period-phase5-state.compact {
  padding: 18px;
  border-radius: 9px;
}

.period-phase5-context {
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 13px 15px;
  border-left: 4px solid #5d7189;
  border-radius: 9px;
  background: #fff;
}

.period-phase5-context > div {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.period-phase5-context b {
  color: #26374d;
}

.period-phase5-context span {
  color: #627083;
  font-size: 12px;
}

.period-phase5-context.consecutive {
  border-left-color: #147d71;
  background: #f3fbf9;
}

.period-phase5-context.same-period {
  border-left-color: #1769aa;
  background: #f5f9fd;
}

.period-phase5-context.scope-mismatch,
.period-phase5-context.snapshot-only {
  border-left-color: #b56a19;
  background: #fff9f1;
}

.period-phase5-capability {
  margin: 0 0 13px;
}

.period-phase5-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.period-phase5-metrics > article,
.period-phase5-counts > article,
.period-phase5-target-grid > article {
  padding: 14px;
  border: 1px solid rgba(73, 91, 112, 0.13);
  border-radius: 11px;
  background: #fff;
}

.period-phase5-metrics > article {
  border-top: 3px solid #8b9aab;
}

.period-phase5-metrics > article.positive {
  border-top-color: #147d71;
}

.period-phase5-metrics > article.negative {
  border-top-color: #b65735;
}

.period-phase5-metrics span,
.period-phase5-counts span,
.period-phase5-target-grid span {
  display: block;
  color: #687587;
  font-size: 11px;
}

.period-phase5-metrics strong,
.period-phase5-counts strong,
.period-phase5-target-grid strong {
  display: block;
  margin: 5px 0 3px;
  color: #172438;
  font-size: 20px;
  line-height: 1.2;
}

.period-phase5-metrics p,
.period-phase5-metrics small,
.period-phase5-counts small {
  display: block;
  margin: 0;
  color: #657387;
  font-size: 11px;
  line-height: 1.5;
}

.period-phase5-metrics .positive small {
  color: #116c63;
}

.period-phase5-metrics .negative small {
  color: #9c4328;
}

.period-phase5-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
}

.period-phase5-main-grid > *,
.period-phase5-card {
  min-width: 0;
}

.period-phase5-card {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid rgba(73, 91, 112, 0.14);
  border-radius: 13px;
  background: #fff;
}

.period-phase5-card > header {
  align-items: flex-start;
  margin-bottom: 13px;
}

.period-phase5-card > header h4 {
  margin-top: 0;
}

.period-phase5-card > header b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #3c5069;
  font-size: 11px;
  white-space: nowrap;
}

.period-phase5-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.period-phase5-target-grid > article {
  padding: 12px;
  background: #f8fafc;
}

.period-phase5-target-grid strong {
  font-size: 17px;
}

.period-phase5-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.period-phase5-counts > article {
  padding: 11px 12px;
  background: #f8fafc;
}

.period-phase5-counts strong {
  font-size: 18px;
}

.period-phase5-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.period-phase5-table-wrap table {
  min-width: 730px;
}

.period-phase5-table-wrap td {
  vertical-align: top;
}

.period-phase5-table-wrap td strong,
.period-phase5-table-wrap td small {
  display: block;
}

.period-phase5-table-wrap td small {
  margin-top: 3px;
  color: #748195;
}

.period-phase5-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bcc8d5;
  border-radius: 999px;
  background: #f4f7fa;
  color: #425269;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.period-phase5-state-pill.new,
.period-phase5-state-pill.worsened,
.period-phase5-state-pill.entered {
  border-color: #d9954a;
  background: #fff5e7;
  color: #8f5110;
}

.period-phase5-state-pill.resolved,
.period-phase5-state-pill.improved,
.period-phase5-state-pill.exited {
  border-color: #58a49b;
  background: #edf9f7;
  color: #0d6a61;
}

.period-phase5-state-pill.persistent {
  border-color: #9aa8b8;
  background: #f1f4f7;
  color: #40516a;
}

.period-phase5-state-pill.changed {
  border-color: #76a7cf;
  background: #eef6fc;
  color: #215f8f;
}

.period-phase5-contracts {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .period-phase5-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .period-phase5-main-grid {
    grid-template-columns: 1fr;
  }

  .period-phase5-toolbar {
    flex-wrap: wrap;
  }

  .period-phase5-toolbar-note {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .period-analytics-phase5 {
    margin-top: 14px;
    padding: 15px;
    border-radius: 14px;
  }

  .period-phase5-heading,
  .period-phase5-context,
  .period-phase5-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .period-phase5-toolbar {
    align-items: stretch;
  }

  .period-phase5-toolbar label,
  .period-phase5-toolbar button {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .period-phase5-metrics,
  .period-phase5-target-grid,
  .period-phase5-counts {
    grid-template-columns: 1fr;
  }

  .period-phase5-card {
    padding: 14px;
  }

  .period-phase5-context > div {
    align-items: flex-start;
    flex-direction: column;
  }
}
