.cost-page {
  --terra-d: #a44320;
}

.cost-page .btn-primary {
  background: var(--terra-d);
}

.cost-page .btn-primary:hover {
  background: #86371b;
}

.cost-page :is(a, summary):focus-visible {
  outline: 2px solid var(--terra-d);
  outline-offset: 3px;
}

.cost-hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.cost-hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: right center;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.cost-hero-banner h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.cost-hero-body {
  margin-top: 20px;
}

.cost-hero-body .article-intro {
  margin: 0;
}

.article-copy .cost-devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.cost-devices .cost-device {
  margin: 0;
}

.cost-device {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}

.cost-device img {
  width: 100%;
  height: auto;
}

.cost-device h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.18rem;
}

.cost-device p {
  font-size: .92rem;
  line-height: 1.5;
}

.cost-savings h3 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.cost-budget {
  width: 100%;
  margin-top: 16px;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: #5d564e;
  font-variant-numeric: tabular-nums;
}

.cost-budget :is(th, td) {
  padding: 13px;
  text-align: left;
  vertical-align: top;
}

.cost-budget th {
  color: var(--ink);
}

.cost-budget thead th {
  background: var(--cream2);
}

.cost-budget thead th:first-child {
  border-top-left-radius: var(--r-sm);
}

.cost-budget thead th:last-child {
  border-top-right-radius: var(--r-sm);
}

.cost-budget tbody :is(th, td) {
  border-top: 1px solid var(--line);
}

.cost-cell-label {
  display: none;
}

.cost-paper,
.cost-sources {
  margin-top: 12px;
  font-size: .92rem;
}

.cost-sources summary {
  cursor: pointer;
  color: var(--terra-d);
  font-weight: 700;
}

.cost-sources p {
  margin-top: 8px;
}

@media (min-width: 720px) {
  .cost-hero-banner {
    align-items: center;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r);
  }

  .cost-hero-banner > * {
    grid-area: 1 / 1;
  }

  .cost-hero-image {
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }

  .cost-hero-banner h1 {
    position: relative;
    width: 44%;
    padding: 24px 12px 24px clamp(24px, 3vw, 34px);
    font-size: clamp(1.9rem, 3vw, 2.15rem);
    text-wrap: balance;
  }
}

@media (max-width: 640px) {
  .article-copy .cost-devices {
    grid-template-columns: minmax(0, 1fr);
  }

  .cost-budget,
  .cost-budget tbody,
  .cost-budget tr {
    display: block;
  }

  .cost-budget thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .cost-budget tbody th {
    display: block;
    background: var(--cream2);
  }

  .cost-budget tr:first-child th {
    border-top: 0;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
  }

  .cost-budget td {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
    gap: 10px;
  }

  .cost-cell-label {
    display: block;
    font-weight: 700;
    color: var(--ink);
  }
}
