.profit-row {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(40px, 6vw, 96px);
}
.profit-row .detail-label {
  color: var(--ink);
  margin-bottom: 24px;
}
.profit-allocation {
  container: profit-allocation / inline-size;
  width: 100%;
  max-width: 600px;
  min-width: 0;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}
.allocation-baseline {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.allocation-baseline strong {
  color: var(--ink);
  white-space: nowrap;
}
.allocation-takeaway {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}
.allocation-takeaway > strong {
  color: #477c5d;
  font-size: 58px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.allocation-takeaway > span {
  max-width: 290px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
}
.allocation-takeaway b {
  color: var(--ink);
  font-weight: 550;
}
.allocation-body {
  display: grid;
  gap: 18px;
}
.allocation-units {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 320px);
  justify-self: center;
}
.allocation-product {
  --unit-fill: #cfcac1;
  --unit-border: #928a7e;
}
.allocation-shipping {
  --unit-fill: #ecc3a8;
  --unit-border: #b27752;
}
.allocation-ads {
  --unit-fill: #b9d0df;
  --unit-border: #678ba5;
}
.allocation-fixed {
  --unit-fill: transparent;
  --unit-border: #8a8174;
}
.allocation-net {
  --unit-fill: #477c5d;
  --unit-border: #477c5d;
}
.allocation-unit {
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--unit-fill);
  border: 1px solid var(--unit-border);
}
.allocation-labels {
  width: 100%;
  max-width: 360px;
  justify-self: center;
  font-size: 15px;
  line-height: 1.4;
}
.allocation-labels > div {
  display: grid;
  grid-template-columns: 10px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-block: 6px;
}
.allocation-labels > div::before {
  content: '';
  width: 10px;
  height: 10px;
  align-self: center;
  border-radius: 3px;
  border: 1px solid var(--unit-border);
  background: var(--unit-fill);
}
.allocation-labels dt {
  grid-column: 3;
  grid-row: 1;
}
.allocation-labels dd {
  grid-column: 2;
  grid-row: 1;
  font-weight: 600;
  white-space: nowrap;
}
.allocation-labels .allocation-net {
  color: #477c5d;
  font-weight: 600;
}
.allocation-details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.5;
}
.allocation-details summary {
  cursor: pointer;
  padding-block: 14px;
  font-weight: 500;
}
.allocation-details summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.allocation-details > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-block: 4px 8px;
}
.allocation-exact > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.allocation-exact > div > dd:not(.allocation-cost-note) {
  font-weight: 550;
  white-space: nowrap;
}
.allocation-cost-note {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.allocation-cost-note strong {
  color: var(--ink);
  white-space: nowrap;
}
.allocation-exact-net {
  color: var(--mint-ink);
  font-weight: 550;
}
@container profit-allocation (min-width: 520px) {
  .allocation-body {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
  }
  .allocation-units {
    width: 280px;
  }
  .allocation-labels {
    position: relative;
  }
  .allocation-labels > div {
    position: absolute;
    top: var(--anchor);
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 0;
  }
  .allocation-labels > div::before {
    position: absolute;
    left: -18px;
    top: 50%;
    width: 12px;
    height: 0;
    border: 0;
    border-top: 1px solid var(--unit-border);
    border-radius: 0;
    background: none;
  }
  .allocation-labels dt {
    grid-column: 2;
  }
  .allocation-labels dd {
    grid-column: 1;
  }
}
@media (max-width: 1000px) {
  .profit-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .profit-row .detail-copy p {
    max-width: 600px;
  }
  .profit-allocation {
    justify-self: center;
  }
}
@media (max-width: 520px) {
  .profit-row .detail-label {
    margin-bottom: 18px;
  }
}
