.cost-planner {
  container-type: inline-size;
  min-width: 0;
}
.cost-planner [hidden] { display: none !important; }
.cost-panel {
  margin-top: 1.15rem;
  padding: clamp(.85rem, 3.2cqi, 1.8rem);
  border: 1px solid var(--line, #c9d0c6);
  border-top: 3px solid var(--green, #245435);
  background: #f7f8f4;
  color: #17241d;
}
.cost-method { margin: 0; padding: 0; min-width: 0; border: 0; }
.cost-method legend, .cost-row > label { font-weight: 650; }
.cost-method legend { padding: 0; margin-bottom: .6rem; }
.cost-options { display: inline-flex; gap: .45rem; flex-wrap: wrap; }
.cost-options input, .cost-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.cost-options label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.8rem;
  padding: .5rem .85rem;
  border: 1px solid #87978b;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  font-weight: 600;
}
.cost-options label::before {
  content: "";
  width: .9rem;
  height: .9rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.cost-options input:checked + label {
  border-color: #245435;
  background: #245435;
  color: white;
}
.cost-options input:checked + label::before { border-width: .29rem; }
.cost-options input:focus-visible + label,
.cost-planner :is(input, select, summary):focus-visible {
  outline: 3px solid #1977a8;
  outline-offset: 3px;
}
.cost-guide { margin: .9rem 0 1.1rem; }
.cost-columns { display: none; }
.cost-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: .45rem .6rem;
  padding: .78rem 0;
  border-top: 1px solid #c9d0c6;
}
.cost-row > label {
  grid-column: 1 / -1;
  font-size: 1rem;
  line-height: 1.35;
}
.cost-row select, .cost-entry input {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  border: 1px solid #87978b;
  border-radius: 3px;
  background-color: white;
  color: #17241d;
  font: inherit;
  font-size: 1rem;
}
.cost-row select {
  appearance: none;
  padding: .45rem 1.6rem .45rem .6rem;
  background-image: linear-gradient(45deg, transparent 50%, #42584a 50%),
                    linear-gradient(135deg, #42584a 50%, transparent 50%);
  background-position: calc(100% - .85rem) 53%, calc(100% - .6rem) 53%;
  background-size: .28rem .28rem;
  background-repeat: no-repeat;
}
.cost-entry { position: relative; }
.cost-entry > span {
  position: absolute;
  top: 50%;
  left: .65rem;
  transform: translateY(-50%);
  color: #496051;
  pointer-events: none;
}
.cost-entry input { padding: .45rem .55rem .45rem 1.8rem; font-variant-numeric: tabular-nums; }
.cost-entry input:disabled { background-color: #e7ebe4; color: #506053; }
.cost-entry input[aria-invalid=true] { border: 2px solid #a13227; }
.cost-planner .cost-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #89251e;
  font-size: .95rem;
}
.cost-result { margin-top: .65rem; padding: 1rem; background: #172b21; color: #fff; }
.cost-figure { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; justify-content: space-between; }
.cost-figure > span { font-weight: 600; }
.cost-figure strong {
  font: 600 clamp(1.7rem, 4.5cqi, 2.4rem)/1.2 var(--display, Arial, sans-serif);
  color: #f2c276;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.cost-figure strong.cost-empty { font: inherit; }
.cost-outstanding, .cost-result > p { margin-top: .65rem; }
.cost-result summary { cursor: pointer; min-height: 2rem; padding-block: .2rem; width: fit-content; }
.cost-planner .cost-result :is(p, li) { color: #edf2eb; }
.cost-planner .cost-result ul { margin-top: .35rem; padding-left: 1.25rem; }
.cost-planner .cost-result li + li { margin-top: .2rem; }
.cost-planner .cost-private { margin: .65rem 0 0; font-size: .9rem; }
@container (min-width: 34rem) {
  .cost-columns, .cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7.1rem, .55fr) minmax(10rem, .7fr);
    gap: .45rem 1rem;
  }
  .cost-columns { padding-bottom: .45rem; font-size: .88rem; font-weight: 650; color: #475b4e; }
  .cost-row > label { grid-column: auto; }
  .cost-row { padding-block: .55rem; }
  .cost-result { padding: 1rem 1.3rem; }
}
@container (max-width: 20rem) {
  .cost-row { grid-template-columns: minmax(0, 1fr); }
}
@media (forced-colors: active) {
  .cost-row select { appearance: auto; }
}
