/* Automation 07 ROI: bone-50 second segment, one-line legend, opaque mobile dock, working-days line.
   Every rule is scoped under #roi. Shared rules come from roi.css. */

#roi .roi-sw-b,
#roi .roi-seg-b {
  background: var(--bone-50);
}

#roi .roi-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

#roi .roi-legend li {
  white-space: nowrap;
}

#roi .roi-dock {
  background: var(--ink);
}

/* Second line under the yearly figure: working days of manager time */
#roi .mt-roi-days {
  margin: 12px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--bone-70);
}

/* Mono note under the results table */
#roi .mt-roi-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ash);
}

/* ---------- Table: fixed layout, so the numbers never move sideways when a slider changes ---------- */

#roi .roi-table {
  table-layout: fixed;
}

#roi .roi-table thead th.roi-num,
#roi .roi-table td.roi-num {
  width: 22%;
  font-variant-numeric: tabular-nums;
}

#roi .roi-table td.roi-num {
  text-align: right;
}

/* Every "how" line reserves two lines, so the total row keeps its place when a sentence wraps */
#roi .roi-how {
  min-height: 3em;
}

/* ---------- 359px and narrower: the CTA may wrap; the yearly figure stays inside its card ---------- */

@media (max-width: 359px) {
  #roi .roi-cta .btn {
    white-space: normal;
    max-width: 100%;
    height: auto;
    padding-block: 0.75rem;
    text-align: center;
  }

  #roi .roi-year {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  #roi .roi-big-n {
    font-size: 2.5rem;
    overflow-wrap: anywhere;
  }
}

/* Phones: the two numeric columns need room for "~1,440 hours" and the yearly header */
@media (max-width: 479px) {
  #roi .roi-table thead th.roi-num,
  #roi .roi-table td.roi-num {
    width: 30%;
    white-space: normal;
  }

  #roi .roi-table td.roi-num small {
    display: block;
    margin-left: 0;
  }
}

/* 359px and narrower: the docked total drops its unit so the figure is not clipped */
@media (max-width: 359px) {
  #roi .roi-dock-u {
    display: none;
  }
}

/* Phones: the legend labels may wrap, so "Cost of dropped items avoided 45%" stays inside the card */
@media (max-width: 479px) {
  #roi .roi-legend li {
    white-space: normal;
    align-items: flex-start;
  }
}

/* Desktop: the disclaimer follows the sliders directly, not pinned to the bottom of a taller column */
@media (min-width: 1024px) {
  #roi .roi-foot {
    margin-top: 0;
  }
}

/* Two-column slider grid: the lone last slider spans the row, so the group reads as a full block */
@media (min-width: 1280px) {
  #roi .roi-row[data-roi-row="cost"] {
    grid-column: 1 / -1;
  }
}
