.lm-stage-settings {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.lm-stage-settings legend {
  font-weight: 650;
  padding: 0 6px;
}
.lm-stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.lm-stage-row label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lm-stage-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.lm-stage-row .row {
  flex-wrap: nowrap;
  gap: 4px;
}
.lm-stage-settings [data-lm-plan] {
  margin: 15px 0 0;
}
.lm-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 18px;
}
.lm-stage-active,
.lm-certificate {
  background: #daf1ea;
  color: #175b48;
}
.lm-role-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.lm-role-card {
  border-top: 5px solid var(--gold);
  background: white;
}
.lm-role-card.lm-known {
  border-top-color: var(--teal);
}
.lm-role-card h2 {
  margin: 10px 0 14px;
  font-size: 1.8rem;
}
.lm-role-card p:last-child {
  margin-bottom: 0;
}
.lm-certificate {
  display: inline-block;
  margin-bottom: 14px;
}
.lm-payoff-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.lm-payoff-choices > div {
  background: #f2f7f8;
  padding: 15px;
  border-radius: 10px;
}
.lm-payoff-choices span,
.lm-payoff-choices strong {
  display: block;
}
.lm-payoff-choices strong {
  margin-top: 8px;
  font-size: 1.25rem;
}
.lm-personal-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lm-personal-score strong {
  font-size: 2rem;
}
.lm-result-controls {
  margin: 18px 0;
}
.lm-result-controls .formgrid {
  margin-top: 14px;
}
.lm-result-controls > .small {
  margin: 10px 0;
}
.lm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.85rem;
  margin: 12px 0 4px;
}
.lm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lm-legend i {
  width: 18px;
  height: 3px;
  background: var(--teal);
}
.lm-legend i.lemon {
  background: #a36712;
}
.lm-legend i.potential {
  background: var(--muted);
  height: 1px;
}
[data-lm-chart] {
  min-width: 0;
}
.lm-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.lm-chart text {
  font:
    12px Inter,
    system-ui,
    sans-serif;
  fill: var(--ink);
}
.lm-chart .lm-tick {
  fill: var(--muted);
}
.lm-gridline {
  stroke: #e5ecee;
  stroke-width: 1;
}
.lm-plot-frame {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.lm-result-detail {
  font-size: 0.9rem;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.lm-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
}
.lm-results-plot {
  min-width: 0;
}
.lm-metric {
  background: #f2f7f8;
  border-radius: 10px;
  padding: 15px;
}
.lm-metric > span,
.lm-metric > small {
  display: block;
  font-size: 0.8rem;
}
.lm-metric > span:first-child {
  font-weight: 650;
}
.lm-metric > strong {
  display: block;
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}
.lm-metric > small {
  margin-top: 8px;
  color: var(--muted);
}
.lm-result-note {
  margin: 16px 0 0;
}
.lm-instructor details {
  margin-top: 16px;
}
.lm-instructor summary {
  margin-bottom: 12px;
}
.display .lm-results {
  max-width: none;
}
.display .lm-result-heading {
  align-items: flex-start;
}
.embedded-display .lm-results {
  padding: 16px 20px;
}
.embedded-display .lm-results h2 {
  margin-bottom: 6px;
}
.embedded-display .lm-metric {
  padding: 10px 14px;
}
.embedded-display .lm-metric > strong {
  font-size: 1.6rem;
  margin: 4px 0;
}
.embedded-display .lm-result-note {
  margin-top: 8px;
  font-size: 0.75rem;
}
.embedded-display .lm-result-detail {
  margin: 0 0 10px;
}
.embedded-display [data-lm-chart] {
  max-width: 850px;
  margin: auto;
}
@media (min-width: 900px) {
  .embedded-display .lm-results-body {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(230px, 1.3fr);
    gap: 20px;
    align-items: center;
  }
  .embedded-display .lm-results > .small:not(.lm-result-note) {
    margin: 6px 0;
  }
  .embedded-display .lm-results .result-heading {
    margin-bottom: 0;
  }
  .embedded-display .lm-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .embedded-display .lm-metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label value" "unit value" "detail detail";
    column-gap: 10px;
    padding: 10px 12px;
  }
  .embedded-display .lm-metric > span:first-child {
    grid-area: label;
  }
  .embedded-display .lm-metric > strong {
    grid-area: value;
    align-self: center;
  }
  .embedded-display .lm-metric > span:nth-of-type(2) {
    grid-area: unit;
  }
  .embedded-display .lm-metric > small {
    grid-area: detail;
    margin-top: 5px;
  }
}
@media (max-width: 600px) {
  .lm-stage-settings {
    padding: 12px;
  }
  .lm-stage-row {
    align-items: flex-start;
  }
  .lm-stage-row label {
    align-items: flex-start;
  }
  .lm-stage-row input[type="checkbox"] {
    flex-shrink: 0;
  }
  .lm-role-card h2 {
    font-size: 1.6rem;
  }
  .lm-payoff-choices {
    grid-template-columns: 1fr;
  }
  .lm-result-controls .row .btn {
    flex: 1 1 auto;
  }
  .lm-metrics {
    grid-template-columns: 1fr;
  }
  .lm-metric > strong {
    font-size: 1.6rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lm-known {
    animation: lemons-reveal 0.25s ease-out;
  }
  @keyframes lemons-reveal {
    from {
      transform: translateY(4px);
    }
    to {
      transform: translateY(0);
    }
  }
}

.lm-legend i.reliable {
  background: repeating-linear-gradient(
    to right,
    var(--teal) 0 4px,
    transparent 4px 8px
  );
}
