/* Runway check (templates/core/partials/_runway_check_inputs.html and _runway_check_results.html), on the public
   calculator page. Built on the design system (.ds-input, .ds-select, .ds-tabs, .ds-alert,
   .ds-btn) and comp-calculator.css (.cc-*); this file only lays them out. Tokens only. */

.runway-check {
  color: var(--ds-text);
  min-width: 0;
  text-align: left;
}

.runway-check *,
.runway-check *::before,
.runway-check *::after {
  box-sizing: border-box;
}

/* One column of inputs, tiles, facts and the button */
.runway-check__stack {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-16);
  min-width: 0;
}

/* Tiles: two columns, the After tile takes the full row when the full-time tile is hidden; a green After only when the structure holds */
.runway-check__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-12);
}

.runway-check__tiles > [x-cloak] {
  display: none;
}

.runway-check__tile {
  padding: var(--ds-space-16);
}

.runway-check__tiles--three .runway-check__tile--after {
  grid-column: 1 / -1;
}

.runway-check__tile--positive {
  border-color: var(--ds-status-success-text);
  background: var(--ds-status-success-bg);
}

.runway-check__detail {
  margin-top: var(--ds-space-8);
  color: var(--ds-text-muted);
  font-size: var(--ds-type-caption-size);
  line-height: var(--ds-type-caption-leading);
  overflow-wrap: anywhere;
}

.runway-check__detail--warning {
  color: var(--ds-text);
  font-weight: 600;
}

.runway-check__due,
.runway-check__note {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.runway-check__due {
  color: var(--ds-text);
  font-weight: 500;
}

/* The role names are long ("Fractional CRO / Head of Sales"): the select takes the whole row */
.runway-check__role {
  grid-column: 1 / -1;
  min-width: 0;
}

.runway-check__role .ds-select {
  width: 100%;
}

.runway-check__typical {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.runway-check--muted .cc-card__figure {
  color: var(--ds-text-muted);
}

.runway-check__kept {
  margin: 0;
  color: var(--ds-text);
  font-weight: 600;
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.runway-check__facts .runway-check__fact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--ds-space-4) var(--ds-space-12);
}

.runway-check__facts dd {
  font-variant-numeric: tabular-nums;
}

.runway-check__raise {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-12);
}

/* Money fields: the standard .ds-input with a $ prefix and an optional "/ month" suffix laid over its padding */
.runway-check__money {
  position: relative;
}

.runway-check__money .ds-input {
  padding-left: var(--ds-space-32);
  padding-right: var(--ds-space-8);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.runway-check__money--suffix .ds-input {
  padding-right: calc(var(--ds-space-64) + var(--ds-space-4));
}

.runway-check__affix {
  position: absolute;
  top: 50%;
  left: var(--ds-space-16);
  color: var(--ds-text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.runway-check__affix--end {
  left: auto;
  right: var(--ds-space-16);
  font-size: var(--ds-type-caption-size);
  white-space: nowrap;
}

/* Lighter than the typed value, still AA on the surface */
.runway-check__money .ds-input::placeholder,
.runway-check .ds-input::placeholder {
  color: var(--ds-text-muted);
  font-size: var(--ds-type-caption-size);
  font-weight: 400;
}

/* The helper's secondary grey is under AA on the card surface; muted passes in both modes */
.runway-check .runway-check__caption,
.runway-check .ds-field__helper {
  color: var(--ds-text-muted);
}

.runway-check__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.runway-check__amount {
  color: var(--ds-text-muted);
  font-size: var(--ds-type-caption-size);
  font-weight: 500;
}

.runway-check__seg {
  display: flex;
  width: 100%;
}

.runway-check__seg .ds-tab {
  flex: 1;
  min-height: var(--ds-space-48);
}

.runway-check__range {
  width: 100%;
  margin: 0;
  accent-color: var(--ds-accent-strong);
}

.runway-check__scale {
  display: flex;
  justify-content: space-between;
  color: var(--ds-text-muted);
  font-size: var(--ds-type-caption-size);
  line-height: var(--ds-type-caption-leading);
}

.runway-check__raise-lines {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.runway-check__cta {
  width: 100%;
  justify-content: center;
  height: auto;
  min-height: var(--ds-space-48);
  text-align: center;
  white-space: normal;
}

.runway-check__basis {
  margin: 0;
  text-align: center;
}

.runway-check__tile p {
  margin: 0;
}

.runway-check .cc-card__figure {
  font-weight: 600;
}
