.cost-page {
  padding-bottom: 4rem;
}
.cost-intro {
  padding: clamp(1.5rem, 4vw, 3rem) 0 2rem;
  max-width: 760px;
}
.cost-intro h1 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.06;
  margin: 0.8rem 0 1.3rem;
}
.cost-intro > p {
  font-size: 1.1rem;
  max-width: 620px;
}
.cost-page .cost-fine {
  font-size: 0.85rem;
  color: #536354;
  line-height: 1.55;
}
.cost-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.cost-enable {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
.cost-step {
  background: #fff;
  border: 1px solid #d4ddcc;
  border-radius: 16px;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  margin-bottom: 1rem;
}
.cost-step h2 {
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0.6rem 0 1.2rem;
}
.cost-page label {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  margin-bottom: 0.45rem;
}
.cost-page select,
.cost-page input {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  min-height: 46px;
  border: 1px solid #8c9c81;
  border-radius: 7px;
  background: #fff;
  color: #20372e;
  padding: 0.65rem;
}
.cost-page select {
  text-overflow: ellipsis;
}
.cost-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
}
.cost-field {
  min-width: 0;
}
.cost-money {
  display: flex;
  align-items: center;
  position: relative;
}
.cost-money span {
  position: absolute;
  left: 0.75rem;
  color: #526052;
}
.cost-money input {
  padding-left: 1.6rem;
}
.cost-field small,
#cost-billing-help {
  display: block;
  line-height: 1.45;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  color: #536354;
}
.cost-page .cost-error {
  display: block;
  color: #9b2923;
  min-height: 0;
}
.cost-page input[aria-invalid='true'],
.cost-page select[aria-invalid='true'] {
  border-color: #9b2923;
}
.cost-recurring,
#cost-plan-fields {
  margin-top: 1.3rem;
}
.cost-model-note {
  border-left: 3px solid #798b57;
  padding: 0.8rem 1rem;
  background: #edf2e9;
  font-size: 0.9rem;
}
.cost-model-note p {
  margin: 0.6rem 0;
}
.cost-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.cost-page button {
  font: inherit;
  border: 1px solid #7e8d71;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: #20372e;
  cursor: pointer;
  min-height: 44px;
}
.cost-page button.btn {
  background: #20372e;
  color: #fff;
}
.cost-results {
  background: #edf2e9;
  border: 1px solid #c8d4c2;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border-radius: 18px;
  position: sticky;
  top: 1rem;
  min-width: 0;
}
.cost-results h2 {
  font-size: 1.65rem;
  margin: 0.7rem 0;
}
.cost-results p {
  font-size: 0.9rem;
  line-height: 1.55;
}
.cost-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 1.4rem 0;
}
.cost-totals > div {
  background: #20372e;
  color: white;
  padding: 1.05rem;
  border-radius: 12px;
  min-width: 0;
}
.cost-totals > div + div {
  background: #374d3b;
}
.cost-totals strong {
  display: block;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.3;
  margin: 0.45rem 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.cost-totals small {
  color: #e0e7d9;
}
.cost-chart > div {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
}
.cost-chart span {
  flex: 0 0 55px;
  font-size: 0.82rem;
}
.cost-chart svg {
  flex: 1;
  min-width: 0;
  height: 24px;
  background: #dfe7d7;
  border-radius: 4px;
}
.cost-bar-upfront {
  fill: #20372e;
}
.cost-bar-subscription {
  fill: #a17c25;
}
.cost-bar-food {
  fill: #677c9a;
}
.cost-bar-care {
  fill: #7f934f;
}
.cost-results .cost-chart-note {
  font-size: 0.78rem;
  color: #536354;
}
.cost-table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
}
.cost-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.cost-breakdown caption {
  text-align: left;
  font-weight: 650;
  padding: 0.6rem 0;
}
.cost-breakdown th,
.cost-breakdown td {
  padding: 0.65rem 0.45rem;
  border-bottom: 1px solid #c8d4c2;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.cost-breakdown thead th {
  color: #fff;
  background: #20372e;
}
.cost-breakdown tbody th {
  background: transparent;
  color: #20372e;
  text-align: left;
  font-weight: 550;
}
.cost-breakdown td,
.cost-breakdown thead th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}
.cost-breakdown tbody tr:last-child {
  font-weight: 750;
  border-top: 2px solid #7e8d71;
}
.cost-breakdown tbody tr:last-child th {
  font-weight: 750;
}
.cost-page summary {
  font-weight: 650;
  padding: 0.8rem 0;
  cursor: pointer;
}
#cost-setup-details > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  margin: 0.5rem 0;
}
#cost-setup-details dd {
  margin: 0;
}
#cost-print {
  width: 100%;
  margin-top: 1rem;
}
.cost-example-note,
.cost-offline {
  background: #f5edcf;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.cost-method {
  margin: 3rem 0 0;
  border-top: 1px solid #c8d4c2;
  padding-top: 2rem;
  max-width: 1080px;
}
.cost-method h2 {
  font-size: 2rem;
  margin: 0.7rem 0 1rem;
}
.cost-method h3 {
  font-size: 1.2rem;
}
.cost-method p {
  line-height: 1.7;
}
.cost-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.cost-next {
  background: #edf2e9;
  border-radius: 12px;
  padding: 1rem 1.3rem;
  margin-top: 1.5rem;
}
.cost-page [hidden] {
  display: none !important;
}
.cost-page :focus-visible {
  outline: 3px solid #a17c25;
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .cost-layout {
    grid-template-columns: 1fr;
  }
  .cost-results {
    position: static;
  }
  .cost-method-grid {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}
@media (max-width: 450px) {
  .cost-fields {
    grid-template-columns: 1fr;
  }
  .cost-totals {
    grid-template-columns: 1fr;
  }
  .cost-totals strong {
    font-size: 2rem;
  }
}
@media print {
  header.masthead,
  footer.footer,
  .breadcrumb,
  .cost-actions,
  #cost-print,
  .cost-method,
  .cost-intro .eyebrow {
    display: none !important;
  }
  .cost-layout {
    display: block;
  }
  .cost-results {
    position: static;
    break-inside: avoid;
    margin-top: 1rem;
  }
  .cost-enable {
    opacity: 1;
  }
  .cost-step {
    break-inside: avoid;
  }
  .cost-fields {
    grid-template-columns: 1fr 1fr;
  }
  .cost-totals {
    grid-template-columns: 1fr 1fr;
  }
}

.cost-breakdown tbody tr:not(:last-child) th::before {
  content: '';
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.4rem;
  background: #20372e;
}
.cost-breakdown tbody tr:nth-child(2) th::before {
  background: #a17c25;
}
.cost-breakdown tbody tr:nth-child(3) th::before {
  background: #677c9a;
}
.cost-breakdown tbody tr:nth-child(4) th::before {
  background: #7f934f;
}

.cost-breakdown {
  min-width: 0;
}
.cost-breakdown th,
.cost-breakdown td {
  min-width: 0;
}
