.st-page {
  padding-left: 20px;
  font-family: Arial, sans-serif;
}

#main.st-page :is(p, label, legend, span, strong, bdi, th, td, caption, h1, h2, h3, a) {
  font-family: Arial, sans-serif;
}

.st-updated {
  float: left;
  color: #55614e;
  font-size: 13px;
}

.st-intro {
  max-width: 780px;
  font-size: 1.08em;
  line-height: 1.7;
}

.st-calculator {
  margin: 24px 0;
  padding: 22px;
  background: #f6faf3;
  border: 1px solid #b2cc9e;
  border-top: 4px solid #3f7f00;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(44, 83, 32, 0.07);
}

.st-calculator > h2 {
  margin: 0 0 18px;
  color: #285f20;
  font-size: 21px;
}

.st-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.st-fields--primary {
  grid-template-columns: minmax(0, 500px);
}

.st-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.st-field > label {
  display: block;
  margin-bottom: 7px;
  color: #243d1d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.st-field--wide {
  grid-column: 1 / -1;
}

#main.st-page .st-field input:not([type="checkbox"]):not([type="hidden"]),
#main.st-page .st-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 9px 11px;
  color: #183413;
  background: #fff;
  border: 1px solid #8a9c80;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

#main.st-page .st-field input[inputmode="decimal"] {
  direction: ltr;
  text-align: right;
}

#main.st-page .st-field--primary input:not([type="hidden"]) {
  min-height: 54px;
  border: 2px solid #3f7f00;
  font-size: 24px;
  font-weight: 700;
}

#main.st-page .st-field .site-input-with-unit {
  width: 100%;
  gap: 7px;
}

#main.st-page .st-field .site-input-with-unit input {
  flex: 1 1 0%;
  width: 0 !important;
  min-width: 0;
  min-height: 46px;
}

#main.st-page .st-field .site-input-unit {
  min-width: 46px;
  min-height: 46px;
  color: #2a6020;
  background: #eaf3e3;
  border-color: #b2cc9e;
  border-radius: 6px;
}

#main.st-page .st-field--primary .site-input-unit {
  min-height: 54px;
}

#main.st-page input:focus-visible,
#main.st-page select:focus-visible,
#main.st-page button:focus-visible,
#main.st-page a:focus-visible {
  outline: 3px solid #668b4e;
  outline-offset: 3px;
}

#main.st-page input[aria-invalid="true"] {
  border-color: #a52828;
}

.st-field-help,
.st-section-help,
.st-assumption {
  color: #52634a;
  font-size: 13px;
  line-height: 1.6;
}

.st-field-help {
  margin: 7px 0 0;
}

.st-section-help {
  margin: 0 0 19px;
}

.st-assumption {
  margin: 17px 0;
}

.st-advanced__body {
  padding: 20px;
}

#main.st-page .st-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  color: #243d1d;
  font-size: 15px;
  line-height: 1.6;
  cursor: pointer;
}

#main.st-page .st-check input[type="checkbox"] {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #3f7f00;
}

.st-field--checkbox {
  justify-content: center;
}

.st-study {
  min-width: 0;
  margin: 24px 0 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #c7d9bd;
  border-radius: 8px;
}

.st-study legend {
  padding: 0 7px;
  color: #285f20;
  font-size: 16px;
  font-weight: 700;
}

.st-study__fields {
  margin-top: 17px;
}

.st-study__fields.is-disabled {
  opacity: 0.6;
}

#main.st-page .st-field input:disabled {
  color: #4b5544;
  background: #f1f3ef;
  cursor: not-allowed;
}

#main.st-page .st-submit {
  display: inline-block;
  min-height: 48px;
  margin: 0;
  padding: 12px 28px;
  color: #fff;
  background: #347c20;
  border: 1px solid #2a641a;
  border-radius: 7px;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

#main.st-page .st-submit:hover {
  background: #286819;
}

#main.st-page a.st-submit {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
}

#main.st-page .st-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.st-results {
  margin: 24px 0 30px;
  scroll-margin-top: 20px;
}

.st-placeholder,
.st-loading {
  margin: 0;
  padding: 15px 17px;
  color: #4c5e45;
  background: #f5f7f3;
  border-right: 4px solid #9bac91;
  border-radius: 5px;
  line-height: 1.6;
}

.st-result {
  overflow: hidden;
  padding: 22px;
  color: #183413;
  background: #f7fbf5;
  border: 1px solid #acd09d;
  border-top: 4px solid #3f7f00;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(44, 83, 32, 0.08);
}

.st-result__heading,
.st-result-heading {
  margin: 0 0 15px;
  color: #285f20;
  font-size: 21px;
  line-height: 1.4;
  scroll-margin-top: 20px;
}

.st-result p {
  line-height: 1.65;
}

.st-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
}

.st-summary__item {
  min-width: 0;
  margin: 0;
  padding: 15px 12px;
  background: #fff;
  border: 1px solid #d6e5cf;
  border-radius: 9px;
  text-align: center;
}

.st-summary__item--primary {
  background: #eaf5e3;
  border-color: #a8c995;
}

.st-summary__label,
.st-summary__value {
  display: block;
  margin: 0;
}

.st-summary__label {
  color: #52684a;
  font-size: 14px;
  line-height: 1.45;
}

.st-summary__value {
  margin-top: 8px;
  color: #265a1d;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}

/* Number first in the DOM; RTL flex places the currency unit visually left. */
.st-money {
  display: inline-flex;
  direction: rtl;
  align-items: baseline;
  gap: 0.28em;
  white-space: nowrap;
}

.st-money bdi {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.st-money-unit {
  font-size: 0.82em;
}

.st-breakdown {
  margin-top: 20px;
}

.st-result h3,
.st-breakdown h2 {
  margin: 20px 0 11px;
  color: #285f20;
  font-size: 17px;
  line-height: 1.4;
}

.st-table-wrap {
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.st-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0;
  background: #fff;
  font-size: 14px;
}

.st-table caption {
  padding: 0 0 10px;
  color: #285f20;
  font-weight: 700;
  text-align: right;
}

.st-table th,
.st-table td {
  padding: 11px 12px;
  border: 1px solid #d0dfc7;
  text-align: right;
  line-height: 1.5;
}

.st-table thead th {
  color: #fff;
  background: #347524;
  white-space: nowrap;
}

.st-table tbody th {
  font-weight: 400;
}

.st-table tbody tr:nth-child(even) {
  background: #f1f7ed;
}

.st-table tfoot,
.st-table .st-table__total,
.st-table .st-table__requested,
.st-table .st-table__selected {
  color: #234b1d;
  background: #e0efd7;
  font-weight: 700;
}

.st-table .st-table__selected {
  box-shadow: inset 0 0 0 2px #548c35;
}

.st-table__badge {
  display: inline-block;
  padding: 2px 7px;
  margin-inline-start: 5px;
  color: #fff;
  background: #347524;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.st-note,
.st-notes {
  color: #4b6043;
  font-size: 13px;
  line-height: 1.65;
}

.st-note {
  margin: 12px 0 0;
}

.st-error {
  padding: 16px 18px;
  color: #771717;
  background: #fff3f2;
  border: 1px solid #bc5853;
  border-radius: 8px;
  line-height: 1.65;
  scroll-margin-top: 20px;
}

.st-error ul {
  margin: 8px 0 0;
  padding-inline-start: 22px;
}

.st-explanation {
  line-height: 1.75;
}

.st-explanation h2 {
  margin-top: 26px;
  color: #285f20;
  font-size: 21px;
}

.st-disclaimer {
  padding: 13px 16px;
  color: #52604c;
  background: #f4f6f1;
  border-right: 4px solid #93aa84;
  font-size: 14px;
}

.st-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 22px 0;
}

.st-related a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.st-examples {
  margin: 24px 0;
  padding: 18px;
  background: #f6faf3;
  border: 1px solid #c7d9bd;
  border-radius: 8px;
}

.st-examples > h2 {
  margin: 0;
  color: #285f20;
  font-size: 21px;
}

.st-examples .st-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.st-examples .st-related a {
  padding: 9px 12px;
  color: #285f20;
  background: #fff;
  border: 1px solid #c7d9bd;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.5;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.st-examples .st-related a:hover {
  background: #edf5e7;
}

@media (max-width: 780px) {
  #main.st-page p {
    font-size: 16px;
    line-height: 1.65;
  }

  .st-page {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .st-updated {
    float: none;
    display: block;
    margin-bottom: 10px;
  }

  .st-calculator,
  .st-result {
    padding: 17px;
  }

  .st-fields,
  .st-fields--primary {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-summary__item--primary {
    grid-column: 1 / -1;
  }

  .st-advanced__body {
    padding: 16px;
  }

  #main.st-page .st-submit {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .st-calculator,
  .st-result {
    padding: 14px;
  }

  .st-advanced__body {
    padding: 13px;
  }

  .st-study {
    padding: 12px;
  }

  .st-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  #main.st-page .site-disclosure__hint {
    display: none;
  }

  .st-table th,
  .st-table td {
    padding: 9px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-results,
  .st-result__heading {
    scroll-behavior: auto;
  }
}
