/* Three records belonging to one project. The independent ruler example stays separate. */
/* The existing horizontal TOC must scroll within its owner, not widen the page. */
html body.taste-site.ui-v4-site:has(.bc-cost-story) .content-layout > .toc {
  min-inline-size: 0;
  max-inline-size: 100%;
}
@media (max-width: 900px) {
  /* At this size the incumbent TOC moves ahead of the article. Give both
     the same full-width track, instead of sending the article to the aside. */
  html body.taste-site.ui-v4-site:has(.bc-cost-story) .content-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
html body.ui-v4-site .article .bc-cost-story {
  container: bc-cost-story / inline-size;
  --bc-cost-paper: #f1f6f8;
  --bc-cost-ink: #122b3b;
  --bc-cost-copy: #415665;
  --bc-cost-blue: #135d84;
  --bc-cost-line: #c6dbe7;
  min-width: 0;
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-intro {
  max-width: 64ch;
  padding: 0 0 6px;
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-run {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  list-style: none;
  max-inline-size: none;
  padding: 0;
  margin: 24px 0 12px;
  border: 1px solid var(--bc-cost-line);
  border-radius: 16px;
  background: var(--bc-cost-paper);
  color: var(--bc-cost-ink);
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-step {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(16px, 3vw, 27px);
  margin: 0;
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-step + .bc-cost-step {
  border-top: 1px solid var(--bc-cost-line);
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-phase {
  margin: 0 0 6px;
  color: var(--bc-cost-blue);
  font-size: .875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
html body.ui-v4-site .article .bc-cost-story .bc-cost-step h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--bc-cost-ink);
  margin: 0 0 16px;
}
html body.taste-site.ui-v4-site .article .bc-cost-story :is(.bc-cost-run, .bc-cost-other) figure {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-object a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--bc-cost-line);
  border-radius: 10px;
  background: white;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-object img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  background: #fff;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-rework img {
  object-fit: cover;
  object-position: center 45%;
  background: #122b3b;
}
html body.taste-site.ui-v4-site .article .bc-cost-story figcaption {
  color: var(--bc-cost-copy);
  font-size: .875rem;
  line-height: 1.5;
  padding: 8px 0 0;
  margin: 0;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-summary {
  color: var(--bc-cost-ink);
  font-size: .98rem;
  line-height: 1.55;
  margin: 15px 0 3px;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-measured {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding-top: 12px;
  color: var(--bc-cost-copy);
  font-size: .875rem;
  line-height: 1.45;
  margin: 0;
}
.bc-cost-measured strong {color: var(--bc-cost-ink);font-variant-numeric: tabular-nums;font-size: 1.55rem;}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-deep-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  color: var(--bc-cost-blue);
  font-size: .9rem;
  text-decoration-line: underline;
  text-underline-offset: .18em;
}
html body.taste-site.ui-v4-site .article .bc-cost-story .bc-cost-note {
  max-width: 65ch;
  color: var(--bc-cost-copy);
  font-size: .9rem;
  margin: 0 0 16px;
}
.bc-cost-story .bc-cost-other {
  border-block: 1px solid var(--bc-cost-line);
  padding: 0;
  margin: 22px 0;
}
.bc-cost-story .bc-cost-other summary {
  min-height: 44px;
  padding: 10px 0;
  color: var(--bc-cost-blue);
  cursor: pointer;
}
.bc-cost-story .bc-cost-other > div {max-width: 64ch; padding-block: 0 16px;}
.bc-cost-story .bc-cost-other figure img {display: block;max-width: 100%;height: auto;}
.bc-cost-story :is(a,summary):focus-visible {outline: 2px solid var(--bc-cost-blue);outline-offset: 3px;}
@container bc-cost-story (min-width: 40rem) {
  html body.ui-v4-site .article .bc-cost-story .bc-cost-run {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr);
  }
  html body.ui-v4-site .article .bc-cost-story .bc-cost-step + .bc-cost-step {
    border-top: 0;
    border-inline-start: 1px solid var(--bc-cost-line);
  }
  html body.ui-v4-site .article .bc-cost-story .bc-cost-step h3 {min-block-size: 2lh;}
}
