.rf-impression-formula,
.rf-model-formula {
  margin: 1.1rem 0 1.45rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid #008a72;
  border-radius: 0.6rem;
  background: #edf5f1;
  color: #193b32;
  font-size: 1.15rem;
  text-align: center;
}

.rf-impression-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.rf-impression-formula span,
.rf-model-formula span {
  color: #c44d2b;
  font-weight: 700;
}

.rf-model-formula {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rf-delivery-visual {
  margin: 1.8rem 0 2rem;
  padding: 1.35rem;
  border: 1px solid #d7e4dc;
  border-radius: 0.9rem;
  background: linear-gradient(155deg, #f7fbf8 0%, #fff 58%, #fff8f3 100%);
  box-shadow: 0 8px 30px rgb(16 49 37 / 6%);
}

.rf-delivery-heading h2 {
  margin: 0 0 0.3rem;
  color: #193b32;
  font-size: 1.4rem;
}

.rf-delivery-heading p {
  margin: 0 0 1.15rem;
  color: #50645b;
}

.rf-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rf-delivery-plan {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #e2e9e3;
  border-top: 4px solid var(--rf-plan-accent);
  border-radius: 0.7rem;
  background: #fff;
  text-align: center;
}

.rf-delivery-plan-a {
  --rf-plan-accent: #008a72;
}

.rf-delivery-plan-b {
  --rf-plan-accent: #df5a35;
}

.rf-delivery-plan-title {
  margin: 0;
  color: var(--rf-plan-accent);
  font-size: 1.1rem;
}

.rf-delivery-plan-title span {
  display: block;
  margin-top: 0.15rem;
  color: #50645b;
  font-size: 0.85rem;
  font-weight: 500;
}

.rf-delivery-stage {
  display: grid;
  height: 210px;
  place-items: center;
}

.rf-delivery-circle {
  display: grid;
  width: 188px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #fff 0%, #e7eee9 100%);
  box-shadow: 0 0 0 1.5px #b3cbbd, 0 10px 28px rgb(16 49 37 / 11%);
}

.rf-delivery-circle img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rf-delivery-metric {
  margin: 0 0 0.45rem;
  color: #253b33;
  font-size: 0.95rem;
}

.rf-delivery-equation {
  margin: auto 0 0;
  color: #50645b;
  font-size: 0.9rem;
}

.rf-heat-scale {
  max-width: 18rem;
  margin: 1.2rem auto 0;
  color: #50645b;
  text-align: center;
}

.rf-heat-scale strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #253b33;
  font-size: 0.84rem;
}

.rf-heat-scale-bar {
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #327c82 0%, #4a9a88 20%, #b5ac69 50%, #df7440 80%, #c4402e 100%);
}

.rf-heat-scale-endpoints {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.76rem;
}

.rf-interactive {
  margin: 2.25rem 0 1.4rem;
  padding: 1.5rem;
  border: 1px solid #cddfd5;
  border-radius: 0.9rem;
  background: linear-gradient(150deg, #f7fbf8 0%, #fff 65%);
  box-shadow: 0 8px 30px rgb(16 49 37 / 6%);
}

.rf-interactive h3 {
  margin-top: 0;
  color: #193b32;
}

.rf-interactive > p {
  max-width: 72ch;
}

.rf-reach-control {
  display: grid;
  gap: 0.4rem;
  max-width: 24rem;
  margin-top: 1.25rem;
}

.rf-reach-control label {
  font-weight: 600;
}

.rf-reach-control select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #a8c7b9;
  border-radius: 0.45rem;
  background: #fff;
  color: #193b32;
  font: inherit;
}

.rf-reach-control select:focus-visible,
.rf-sliders input[type="range"]:focus-visible {
  outline: 3px solid #008a72;
  outline-offset: 3px;
}

.rf-sliders {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.rf-sliders label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  font-weight: 600;
}

.rf-sliders output {
  color: #008a72;
  font-variant-numeric: tabular-nums;
}

.rf-sliders input[type="range"] {
  width: 100%;
  accent-color: #008a72;
  cursor: pointer;
}

#rf-frequency-b {
  accent-color: #df5a35;
}

.rf-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.rf-result {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: #edf5f1;
  font-size: 0.94rem;
}

.rf-result-b {
  background: #fbf1ec;
}

.rf-result strong {
  color: #008a72;
}

.rf-result-b strong {
  color: #c44d2b;
}

.rf-result span {
  line-height: 1.45;
}

.rf-chart-frame {
  overflow-x: auto;
}

.rf-chart-hint {
  margin: 0 0 0.35rem;
  color: #50645b;
  font-size: 0.85rem;
}

#rf-contribution-chart {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  margin: 0.7rem 0;
  border: 1px solid #e5ede8;
  border-radius: 0.5rem;
  background: #fff;
}

#rf-static-chart[hidden] {
  display: none;
}

.rf-comparison {
  margin: 0.9rem 0 0.35rem;
  color: #193b32;
  font-weight: 700;
}

.rf-note {
  margin-bottom: 0;
  color: #5b6b63;
  font-size: 0.85rem;
  line-height: 1.5;
}

.rf-transform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 1.8rem;
}

.rf-linear-points li + li {
  margin-top: 0.75rem;
}

.rf-linear-points strong {
  color: #193b32;
  font-weight: 800;
}

.rf-knee-table-wrap {
  margin: 1.5rem 0 1.8rem;
  overflow: hidden;
  border: 1px solid #d7e4dc;
  border-radius: 0.8rem;
  box-shadow: 0 6px 22px rgb(16 49 37 / 6%);
}

#quarto-document-content .rf-knee-table {
  display: table;
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 0.94rem;
  line-height: 1.45;
}

.rf-knee-table th,
.rf-knee-table td {
  padding: 1.05rem 1.15rem;
  border: 0;
  border-bottom: 1px solid #e2e9e3;
  vertical-align: middle;
  text-align: right;
}

.rf-knee-table thead th {
  background: #193b32;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.rf-knee-table th {
  letter-spacing: 0;
  text-transform: none;
}

.rf-knee-table th:first-child {
  width: 38%;
  text-align: left;
}

.rf-knee-table tbody th {
  box-shadow: inset 4px 0 var(--rf-accent);
  color: #193b32;
  font-weight: 700;
  font-size: inherit;
}

.rf-knee-table tbody tr:nth-child(even) {
  background: #f2f7f4;
}

.rf-knee-table tbody tr:last-child > * {
  border-bottom: 0;
}

.rf-knee-table td {
  font-variant-numeric: tabular-nums;
}

.rf-knee-table td strong {
  color: #193b32;
  font-size: 1.08em;
  font-weight: 800;
}

.rf-knee-qualifier {
  color: #50645b;
  font-size: 0.86em;
}

@media (max-width: 600px) {
  .rf-knee-table th,
  .rf-knee-table td {
    padding: 0.8rem 0.65rem;
  }

  #quarto-document-content .rf-knee-table {
    font-size: 0.8rem;
  }

  .rf-knee-table thead th {
    font-size: 0.72rem;
  }

  .rf-knee-qualifier {
    display: block;
  }
}

.rf-transform-card {
  min-width: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  border: 1px solid #d7e4dc;
  border-top: 4px solid var(--rf-accent);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 6px 22px rgb(16 49 37 / 7%);
}

.rf-transform-linear {
  --rf-accent: #008a72;
}

.rf-transform-gentle {
  --rf-accent: #5578ad;
}

.rf-transform-fast {
  --rf-accent: #df5a35;
}

.rf-transform-cap {
  --rf-accent: #9360a2;
}

.rf-transform-card h3 {
  margin: 0 0 0.35rem;
  color: #193b32;
  font-size: 1.2rem;
}

.rf-transform-card img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.65rem 0 0.85rem;
  border: 1px solid #edf1ee;
  border-radius: 0.5rem;
}

.rf-transform-card p {
  margin-bottom: 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .rf-delivery-visual {
    padding: 1rem;
  }

  .rf-delivery-grid {
    grid-template-columns: 1fr;
  }

  .rf-interactive {
    padding: 1.1rem;
  }

  .rf-results,
  .rf-transform-grid {
    grid-template-columns: 1fr;
  }
}

.rf-surfaces { padding: 1.25rem; }
.rf-surface-panel { min-width: 0; padding: 1rem; border: 1px solid #d7e4dc; border-radius: .7rem; background: #fff; }
.rf-surface-panel .rf-reach-control { max-width: none; margin-top: 0; }
.rf-surface-chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.rf-surface-legend { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; margin: 1rem 0; font-size: .85rem; }
.rf-surface-legend span { display: flex; align-items: center; gap: .45rem; }
.rf-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; }
.rf-dot-current { background: #193b32; }
.rf-dot-knee { background: #df5a35; }
.rf-view-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.rf-view-buttons button { padding: .45rem .65rem; border: 1px solid #a8c7b9; border-radius: .4rem; color: #193b32; background: #f7fbf8; font: inherit; font-size: .8rem; cursor: pointer; }
.rf-view-buttons button[aria-pressed="true"] { border-color: #176b65; color: #fff; background: #176b65; }
.rf-view-buttons button:focus-visible { outline: 3px solid #df5a35; outline-offset: 3px; }
.rf-view-description { margin: .65rem 0 0; font-size: .8rem; color: #50645b; }
.rf-fallback img { display: block; width: 100%; height: auto; }
@media (max-width: 600px) {
  .rf-surfaces { padding: .8rem; }
  .rf-surface-panel { padding: .6rem; }
  .rf-view-buttons button { flex: 1 1 auto; min-height: 44px; }
}
