.period-analytics-phase8 {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(72, 77, 110, 0.18);
  border-radius: 18px;
  background: #f7f6f9;
  color: #1f2a37;
}

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

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

.period-phase8-heading h3,
.period-phase8-card h4 {
  margin: 4px 0 5px;
  color: #20253b;
}

.period-phase8-heading p,
.period-phase8-card header span,
.period-phase8-toolbar > span,
.period-phase8-contract,
.period-phase8-chart-note {
  margin: 0;
  color: #6a6f82;
  font-size: 12px;
  line-height: 1.65;
}

.period-phase8-eyebrow {
  color: #62539a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.period-phase8-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 18px 0 12px;
  padding: 12px;
  border: 1px solid rgba(72, 77, 110, 0.14);
  border-radius: 12px;
  background: #fff;
}

.period-phase8-toolbar > span {
  margin-left: auto;
  text-align: right;
}

.period-phase8-state {
  padding: 30px 18px;
  border: 1px dashed #c5c3d1;
  border-radius: 12px;
  background: #fff;
  color: #6a6f82;
  text-align: center;
}

.period-phase8-state.compact {
  padding: 20px 16px;
  border-radius: 10px;
}

.period-phase8-state strong {
  display: block;
  margin-bottom: 5px;
  color: #2c3149;
}

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

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

.period-phase8-insight {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 4px;
  padding: 15px 17px;
  border-left: 4px solid #62539a;
  border-radius: 10px;
  background: #f0eef8;
}

.period-phase8-insight span {
  color: #62539a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.period-phase8-insight strong {
  color: #282443;
  font-size: 14px;
  line-height: 1.55;
}

.period-phase8-insight p {
  margin: 0;
  color: #6b6880;
  font-size: 10px;
  line-height: 1.5;
}

.period-phase8-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.period-phase8-kpis > article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(72, 77, 110, 0.13);
  border-top: 3px solid #9896a9;
  border-radius: 11px;
  background: #fff;
}

.period-phase8-kpis > article.high,
.period-phase8-kpis > article.very-high,
.period-phase8-kpis > article.attention {
  border-top-color: #aa5d3c;
}

.period-phase8-kpis > article.moderate {
  border-top-color: #a27a2b;
}

.period-phase8-kpis > article.balanced {
  border-top-color: #2d7772;
}

.period-phase8-kpis span,
.period-phase8-kpis small {
  display: block;
  color: #6c7181;
  font-size: 10px;
}

.period-phase8-kpis strong {
  display: block;
  margin: 5px 0 3px;
  color: #222a42;
  font-size: 19px;
  line-height: 1.2;
}

.period-phase8-history {
  align-items: flex-start;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(72, 77, 110, 0.12);
  border-radius: 10px;
  background: #fff;
}

.period-phase8-history > div {
  justify-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}

.period-phase8-history span {
  color: #6a6f82;
  font-size: 10px;
  font-weight: 800;
}

.period-phase8-history strong {
  color: #343957;
  font-size: 11px;
}

.period-phase8-history p {
  max-width: 620px;
  margin: 0;
  color: #74788a;
  font-size: 10px;
  line-height: 1.55;
  text-align: right;
}

.period-phase8-history.building {
  border-color: #e0cba9;
  background: #fffaf2;
}

.period-phase8-history.ready {
  border-color: #b9d6d1;
  background: #f5fbfa;
}

.period-phase8-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  margin-top: 12px;
}

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

.period-phase8-card {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid rgba(72, 77, 110, 0.14);
  border-radius: 13px;
  background: #fff;
}

.period-phase8-main-grid > .period-phase8-card {
  margin-top: 0;
}

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

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

.period-phase8-card > header b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #efedf5;
  color: #584b87;
  font-size: 11px;
  white-space: nowrap;
}

.period-phase8-lorenz-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(140px, 0.65fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.period-phase8-lorenz {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.period-phase8-lorenz .axis {
  stroke: #9da1ad;
  stroke-width: 1;
}

.period-phase8-lorenz .equality {
  stroke: #b8bbc5;
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}

.period-phase8-lorenz .lorenz-line {
  fill: none;
  stroke: #62539a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.period-phase8-lorenz text {
  fill: #737789;
  font-size: 10px;
}

.period-phase8-lorenz text.axis-label {
  fill: #555b70;
  font-weight: 700;
}

.period-phase8-lorenz-note {
  display: grid;
  gap: 7px;
  padding: 13px;
  border-radius: 10px;
  background: #f5f3f9;
}

.period-phase8-lorenz-note strong {
  color: #3a335d;
  font-size: 12px;
  line-height: 1.45;
}

.period-phase8-lorenz-note span,
.period-phase8-lorenz-note small {
  color: #747286;
  font-size: 10px;
  line-height: 1.55;
}

.period-phase8-bands {
  display: grid;
  gap: 10px;
}

.period-phase8-band-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.75fr) minmax(140px, 1.7fr) minmax(72px, 0.65fr);
  align-items: center;
  gap: 9px;
}

.period-phase8-band-row > div:first-child,
.period-phase8-band-row > div:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.period-phase8-band-row > div:last-child {
  text-align: right;
}

.period-phase8-band-row strong {
  overflow: hidden;
  color: #30364d;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-phase8-band-row span {
  color: #7a7e8e;
  font-size: 9px;
}

.period-phase8-band-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececf1;
}

.period-phase8-band-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.period-phase8-band-track .band-1 {
  background: #62539a;
}

.period-phase8-band-track .band-2 {
  background: #887bb1;
}

.period-phase8-band-track .band-3 {
  background: #aaa4bd;
}

.period-phase8-band-track .band-4 {
  background: #c9c6d2;
}

.period-phase8-risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #ececf1;
}

.period-phase8-risk-grid article {
  min-width: 0;
  padding: 10px;
  border-radius: 9px;
  background: #f7f7f9;
}

.period-phase8-risk-grid article.risk {
  background: #fff3ee;
}

.period-phase8-risk-grid span,
.period-phase8-risk-grid small {
  display: block;
  color: #75798a;
  font-size: 9px;
  line-height: 1.4;
}

.period-phase8-risk-grid strong {
  display: block;
  margin: 4px 0 2px;
  color: #31374f;
  font-size: 14px;
}

.period-phase8-chart-note {
  margin-top: 9px;
  font-size: 10px;
}

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

.period-phase8-table-wrap table {
  min-width: 1080px;
}

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

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

.period-phase8-table-wrap td small {
  margin-top: 3px;
  color: #7b7f8f;
}

.period-phase8-contract {
  margin: 11px 2px 0;
}

@media (max-width: 1240px) {
  .period-phase8-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .period-phase8-lorenz-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .period-phase8-main-grid {
    grid-template-columns: 1fr;
  }

  .period-phase8-history {
    flex-direction: column;
  }

  .period-phase8-history p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 700px) {
  .period-analytics-phase8 {
    padding: 16px;
  }

  .period-phase8-heading,
  .period-phase8-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .period-phase8-toolbar > span {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .period-phase8-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .period-phase8-toolbar .secondary-button {
    flex: 1 1 auto;
  }

  .period-phase8-kpis {
    grid-template-columns: 1fr;
  }

  .period-phase8-band-row {
    grid-template-columns: minmax(70px, 0.8fr) minmax(82px, 1.15fr) minmax(62px, 0.7fr);
    gap: 6px;
  }

  .period-phase8-risk-grid {
    grid-template-columns: 1fr;
  }

  .period-phase8-lorenz-wrap {
    gap: 8px;
  }
}
