.afg-running-costs .afg-hero {
  background: #fff;
}

.afg-running-costs .afg-hero-grid {
  min-height: 570px;
}

.afg-running-costs .afg-hero-copy {
  padding-block: 58px;
}

.afg-running-costs .afg-hero-copy h1 {
  max-width: 680px;
}

.afg-running-costs .afg-hero-image {
  min-height: 570px;
}

.afg-running-costs .afg-hero-image picture,
.afg-running-costs .afg-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.afg-running-costs .afg-hero-image img {
  object-fit: cover;
  object-position: center;
}

.afg-running-costs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--afg-muted);
  font-size: 13px;
  list-style: none;
}

.afg-running-costs-meta strong {
  color: var(--afg-text);
}

.afg-running-costs-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 28px;
  margin-block: 28px 42px;
  padding: 30px;
  border: 1px solid var(--afg-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--afg-shadow);
}

.afg-running-costs-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  align-content: start;
}

.afg-running-costs-form h2,
.afg-running-costs-results h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30px;
  line-height: 1.12;
}

.afg-running-costs-form > p {
  grid-column: 1 / -1;
  margin: -6px 0 2px;
  color: var(--afg-muted);
}

.afg-running-costs-field span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}

.afg-running-costs-field > .afg-running-costs-input {
  display: flex;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #bfc9c1;
  border-radius: 6px;
  background: #fff;
}

.afg-running-costs-input input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--afg-text);
  font: inherit;
}

.afg-running-costs-input b {
  align-self: stretch;
  display: grid;
  min-width: 64px;
  place-items: center;
  padding-inline: 10px;
  border-left: 1px solid var(--afg-border);
  background: #f6f7f4;
  color: var(--afg-muted);
  font-size: 12px;
}

.afg-running-cost-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.afg-running-cost-button {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--afg-green);
  border-radius: 6px;
  background: var(--afg-green);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.afg-running-cost-button--secondary {
  background: #fff;
  color: var(--afg-green);
}

.afg-running-costs-results {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 26px;
  border: 1px solid #cad8ce;
  border-radius: 10px;
  background: #f7f9f6;
}

.afg-running-costs-badge {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9f1eb;
  color: var(--afg-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.afg-running-costs-results > p {
  margin: 8px 0 20px;
  color: var(--afg-muted);
}

.afg-running-costs-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.afg-running-costs-primary article,
.afg-running-costs-secondary > div {
  padding: 17px;
  border: 1px solid var(--afg-border);
  border-radius: 8px;
  background: #fff;
}

.afg-running-costs-primary span,
.afg-running-costs-secondary span {
  display: block;
  margin-bottom: 5px;
  color: var(--afg-muted);
  font-size: 12px;
  font-weight: 700;
}

.afg-running-costs-primary strong {
  display: block;
  color: var(--afg-green-dark);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  line-height: 1.05;
}

.afg-running-costs-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.afg-running-costs-secondary strong {
  font-size: 18px;
}

.afg-running-costs-formula {
  margin: auto 0 0;
  padding-top: 20px;
  color: var(--afg-muted);
  font-size: 12px;
}

.afg-running-costs-formula code {
  display: block;
  margin-top: 5px;
  padding: 9px 10px;
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: #e9eee9;
  color: var(--afg-green-dark);
}

.afg-running-costs-section {
  padding-block: 34px;
}

.afg-running-costs-section-heading {
  max-width: 820px;
  margin-bottom: 20px;
}

.afg-running-costs-section-heading h2 {
  margin: 0 0 8px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  line-height: 1.12;
}

.afg-running-costs-section-heading p {
  margin: 0;
  color: var(--afg-muted);
}

.afg-running-costs-method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  gap: 28px;
  align-items: start;
}

.afg-running-costs-method-card {
  padding: 24px;
  border: 1px solid var(--afg-border);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--afg-shadow);
}

.afg-running-costs-method-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.afg-running-costs-method-card p:last-child {
  margin-bottom: 0;
}

.afg-running-costs-source {
  border-top: 4px solid var(--afg-green);
}

.afg-running-costs-source a,
.afg-running-costs-download {
  color: var(--afg-green);
  font-weight: 800;
}

.afg-running-costs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--afg-border);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--afg-shadow);
}

.afg-running-costs-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.afg-running-costs-table th,
.afg-running-costs-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--afg-border);
  text-align: left;
}

.afg-running-costs-table thead th {
  background: var(--afg-green-dark);
  color: #fff;
  font-size: 13px;
}

.afg-running-costs-table tbody tr:nth-child(even) {
  background: #f8f9f7;
}

.afg-running-costs-table tbody tr:last-child > * {
  border-bottom: 0;
}

.afg-running-costs-caption {
  margin: 12px 0 0;
  color: var(--afg-muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .afg-running-costs .afg-hero-grid {
    min-height: 0;
  }

  .afg-running-costs .afg-hero-image {
    min-height: 420px;
  }

  .afg-running-costs-shell,
  .afg-running-costs-method {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .afg-running-costs .afg-hero-copy {
    padding-block: 34px;
  }

  .afg-running-costs .afg-hero-image {
    min-height: 260px;
  }

  .afg-running-costs-shell {
    gap: 22px;
    padding: 19px;
  }

  .afg-running-costs-form {
    grid-template-columns: 1fr;
  }

  .afg-running-costs-form h2,
  .afg-running-costs-form > p,
  .afg-running-cost-actions {
    grid-column: auto;
  }

  .afg-running-costs-form h2,
  .afg-running-costs-results h2,
  .afg-running-costs-section-heading h2 {
    font-size: 25px;
  }

  .afg-running-costs-results {
    padding: 19px;
  }

  .afg-running-costs-primary,
  .afg-running-costs-secondary {
    grid-template-columns: 1fr;
  }

  .afg-running-cost-actions {
    flex-direction: column;
  }
}
