.profit-actual-scorecard {
  border-top: 4px solid #138b82;
  padding-top: 24px;
}

.profit-actual-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line, #d7e0e7);
  background: #fff;
  margin: 18px 0 14px;
}

.profit-actual-counts > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--line, #d7e0e7);
}

.profit-actual-counts > span:last-child {
  border-right: 0;
}

.profit-actual-counts small,
.profit-actual-latest small,
.profit-actual-plans small,
.profit-actual-history small,
.profit-actual-review small {
  color: var(--muted, #60738b);
}

.profit-actual-counts strong {
  color: var(--ink, #142238);
  font-size: 1.3rem;
}

.profit-actual-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px;
  border: 1px dashed #b9c8d4;
  background: #f8fbfc;
}

.profit-actual-empty > span {
  color: #138b82;
}

.profit-actual-empty strong,
.profit-actual-empty p {
  display: block;
}

.profit-actual-empty p {
  margin: 4px 0 0;
  color: var(--muted, #60738b);
}

.profit-actual-latest {
  border: 1px solid #b9dcd4;
  border-left: 4px solid #138b82;
  background: #f6fffb;
  margin-bottom: 18px;
}

.profit-actual-latest--red_attention_required {
  border-color: #efb7a4;
  border-left-color: #d85f3e;
  background: #fff9f6;
}

.profit-actual-latest--yellow_review_needed {
  border-color: #ecd28b;
  border-left-color: #d89d00;
  background: #fffdf4;
}

.profit-actual-latest > header,
.profit-actual-lane > header,
.profit-actual-history article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profit-actual-latest > header {
  padding: 15px 16px;
  border-bottom: 1px solid #d8e7e2;
}

.profit-actual-latest h3,
.profit-actual-lane h3 {
  margin: 3px 0 0;
  color: var(--ink, #142238);
  font-size: 1.04rem;
}

.profit-actual-latest__numbers,
.profit-actual-review__numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profit-actual-latest__numbers > span,
.profit-actual-review__numbers > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #d8e7e2;
}

.profit-actual-latest__numbers > span:last-child,
.profit-actual-review__numbers > span:last-child {
  border-right: 0;
}

.profit-actual-latest__numbers strong,
.profit-actual-review__numbers strong {
  overflow-wrap: anywhere;
  color: #0c6c64;
  font-size: 1.1rem;
}

.profit-actual-latest > p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 16px;
  color: var(--muted, #60738b);
  font-size: .88rem;
}

.profit-actual-lane {
  margin-top: 17px;
  border: 1px solid var(--line, #d7e0e7);
  background: #fff;
}

.profit-actual-lane > header {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line, #d7e0e7);
}

.profit-actual-plans__head,
.profit-actual-plans article {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(150px, .8fr) minmax(190px, 1fr) minmax(130px, auto);
  gap: 14px;
  align-items: center;
}

.profit-actual-plans__head {
  padding: 9px 14px;
  background: #f4f8fa;
  color: #597088;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profit-actual-plans article {
  position: relative;
  padding: 14px;
  border-top: 1px solid #e4eaee;
}

.profit-actual-plans article:first-of-type {
  border-top: 0;
}

.profit-actual-plans article > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profit-actual-plans article > span:last-child {
  justify-items: end;
}

.profit-actual-plans strong,
.profit-actual-history strong {
  overflow-wrap: anywhere;
  color: var(--ink, #142238);
}

.profit-actual-history {
  display: grid;
}

.profit-actual-history article {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 1fr);
  gap: 13px 20px;
  padding: 15px 16px;
  border-top: 1px solid #e4eaee;
}

.profit-actual-history article:first-child {
  border-top: 0;
}

.profit-actual-history article > header,
.profit-actual-history article > footer {
  grid-column: 1 / -1;
}

.profit-actual-history article > header > span {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profit-actual-history article p {
  margin: 5px 0 0;
  color: var(--muted, #60738b);
}

.profit-actual-history dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #dce5ea;
}

.profit-actual-history dl > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid #dce5ea;
}

.profit-actual-history dl > div:last-child {
  border-right: 0;
}

.profit-actual-history dt {
  color: #60738b;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profit-actual-history dd {
  margin: 0;
  color: var(--ink, #142238);
  font-weight: 800;
}

.profit-actual-history footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #60738b;
  font-size: .82rem;
}

.profit-actual-boundary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 13px 15px;
  border: 1px solid #c8d8e1;
  background: #f7fafc;
  color: #60738b;
}

.profit-actual-boundary p {
  margin: 0;
}

.profit-actual-checks {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #d5e0e6;
}

.profit-actual-checks legend {
  padding: 0 6px;
  color: var(--ink, #142238);
  font-weight: 800;
}

.profit-actual-checks label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  background: #f6f9fb;
  cursor: pointer;
}

.profit-actual-checks input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #138b82;
}

.profit-actual-checks span {
  display: grid;
  gap: 3px;
}

.profit-actual-review {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.profit-actual-review > header {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-left: 4px solid #d89d00;
  background: #fffaf0;
}

.profit-actual-review > header p,
.profit-actual-review__focus {
  margin: 0;
  color: #60738b;
}

.profit-actual-review__numbers {
  border: 1px solid #dce5ea;
}

.profit-actual-review__focus {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 12px 14px;
  background: #f5f9fb;
}

@media (max-width: 900px) {
  .profit-actual-counts,
  .profit-actual-latest__numbers,
  .profit-actual-review__numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profit-actual-counts > span:nth-child(2),
  .profit-actual-latest__numbers > span:nth-child(2),
  .profit-actual-review__numbers > span:nth-child(2) {
    border-right: 0;
  }

  .profit-actual-counts > span:nth-child(-n+2),
  .profit-actual-latest__numbers > span:nth-child(-n+2),
  .profit-actual-review__numbers > span:nth-child(-n+2) {
    border-bottom: 1px solid var(--line, #d7e0e7);
  }

  .profit-actual-plans__head {
    display: none;
  }

  .profit-actual-plans article,
  .profit-actual-history article {
    grid-template-columns: 1fr;
  }

  .profit-actual-plans article > span::before {
    content: attr(data-label);
    color: #60738b;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .profit-actual-plans article > span:last-child {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .profit-actual-scorecard {
    padding-top: 18px;
  }

  .profit-actual-counts,
  .profit-actual-latest__numbers,
  .profit-actual-review__numbers {
    grid-template-columns: 1fr;
  }

  .profit-actual-counts > span,
  .profit-actual-latest__numbers > span,
  .profit-actual-review__numbers > span {
    border-right: 0;
    border-bottom: 1px solid var(--line, #d7e0e7);
  }

  .profit-actual-counts > span:last-child,
  .profit-actual-latest__numbers > span:last-child,
  .profit-actual-review__numbers > span:last-child {
    border-bottom: 0;
  }

  .profit-actual-latest > header,
  .profit-actual-lane > header,
  .profit-actual-history article > header,
  .profit-actual-history footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .profit-actual-history dl {
    grid-template-columns: 1fr;
  }

  .profit-actual-history dl > div {
    border-right: 0;
    border-bottom: 1px solid #dce5ea;
  }

  .profit-actual-history dl > div:last-child {
    border-bottom: 0;
  }
}
