:root {
  --rfm-ink: #27332f;
  --rfm-sage: #6f8075;
  --rfm-gold: #b69a64;
  --rfm-cream: #f8f5ee;
  --rfm-line: #d9d5ca;
  --rfm-white: #fff;
  --rfm-warn: #fff8e8;
}
.rfm-calc {
  max-width: 1080px;
  margin: 2rem auto;
  color: var(--rfm-ink);
  font:
    16px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.rfm-calc * {
  box-sizing: border-box;
}
.rfm-hero {
  padding: 2rem;
  border: 1px solid var(--rfm-line);
  background: linear-gradient(120deg, var(--rfm-cream), #fff);
}
.rfm-hero h2,
.rfm-section-head h3 {
  margin: 0.1rem 0 0.5rem;
  font-family: Georgia, serif;
  font-weight: 500;
}
.rfm-eyebrow,
.rfm-step-count {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  color: var(--rfm-sage);
  font-weight: 700;
}
.rfm-privacy,
.rfm-caution {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  background: var(--rfm-cream);
  border-left: 4px solid var(--rfm-gold);
}
.rfm-caution {
  background: var(--rfm-warn);
}
.rfm-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}
.rfm-paths button {
  background: #fff;
  color: var(--rfm-ink);
  border: 1px solid var(--rfm-line);
  text-align: left;
}
.rfm-paths button.is-active {
  border-color: var(--rfm-sage);
  box-shadow: inset 0 -3px var(--rfm-sage);
}
.rfm-paths small {
  display: block;
  font-weight: 400;
  margin-top: 0.2rem;
}
.rfm-panel {
  display: none;
  border: 1px solid var(--rfm-line);
  padding: 2rem;
  background: #fff;
}
.rfm-panel.is-active {
  display: block;
}
.rfm-grid {
  display: grid;
  gap: 1rem;
}
.rfm-grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.rfm-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.rfm-calc label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 650;
}
.rfm-calc label span,
.rfm-calc label small,
.rfm-help {
  font-weight: 400;
  color: #66706c;
  font-size: 0.83rem;
}
.rfm-calc input,
.rfm-calc select {
  width: 100%;
  padding: 0.72rem;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #fff;
  font: inherit;
  color: inherit;
}
.rfm-calc input:focus,
.rfm-calc select:focus,
.rfm-calc button:focus {
  outline: 3px solid #b8d2c2;
  outline-offset: 2px;
}
.rfm-calc button {
  border: 0;
  border-radius: 3px;
  padding: 0.75rem 1rem;
  background: var(--rfm-sage);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.rfm-calc button.secondary {
  background: #fff;
  color: var(--rfm-ink);
  border: 1px solid var(--rfm-line);
}
fieldset {
  border: 1px solid var(--rfm-line);
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}
legend {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  padding: 0 0.4rem;
}
.check {
  flex-direction: row;
  align-items: flex-start;
}
.check input {
  width: auto;
  margin-top: 0.25rem;
}
.rfm-actions,
.rfm-section-head,
.rfm-report-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.rfm-section-head {
  margin: 0 0 1rem;
  align-items: flex-start;
}
.rfm-section-head p {
  margin: 0.2rem 0;
}
details {
  border-top: 1px solid var(--rfm-line);
  padding: 1rem 0;
}
summary {
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.rfm-table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  border-bottom: 1px solid var(--rfm-line);
  padding: 0.65rem;
  text-align: right;
}
th:first-child,
td:first-child {
  text-align: left;
}
.rfm-result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.rfm-card {
  border: 1px solid var(--rfm-line);
  padding: 1.2rem;
  background: var(--rfm-cream);
}
.rfm-card h4 {
  margin: 0;
}
.rfm-amount {
  font:
    500 1.8rem Georgia,
    serif;
  margin: 0.4rem 0;
}
.rfm-card small {
  display: block;
}
.rfm-tag {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background: #e6eee9;
  color: #40564a;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rfm-empty {
  text-align: center;
  padding: 4rem;
  color: #66706c;
}
.rfm-calc [hidden] {
  display: none !important;
}
.rfm-calc .calc-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--rfm-line);
}
@media (max-width: 760px) {
  .rfm-paths,
  .rfm-grid.two,
  .rfm-grid.three,
  .rfm-result-cards {
    grid-template-columns: 1fr;
  }
  .rfm-panel,
  .rfm-hero {
    padding: 1.2rem;
  }
  .rfm-section-head {
    display: block;
  }
  .rfm-report-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .rfm-paths button {
    text-align: center;
  }
}
@media print {
  body * {
    visibility: hidden;
  }
  .rfm-calc,
  .rfm-calc * {
    visibility: visible;
  }
  .rfm-calc {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .rfm-hero,
  .rfm-privacy,
  .rfm-paths,
  .rfm-panel:not([data-panel="results"]),
  .rfm-report-actions,
  .rfm-empty {
    display: none !important;
  }
  .rfm-panel[data-panel="results"] {
    display: block !important;
    border: 0;
    padding: 0;
  }
  .rfm-panel details {
    display: block;
  }
  .rfm-panel details > div {
    display: block !important;
  }
  .rfm-caution {
    break-inside: avoid;
  }
  .rfm-card {
    break-inside: avoid;
  }
}
