/*
 * ROI calculator page (templates/Pages/roi_calculator.php; script: webroot/js/roi.js).
 * Loaded on this page only. Uses the design tokens, .btn, .heading-display and the shared
 * elements (divider, pricing_cta) from site.css; everything here is scoped under .roi-*.
 *
 * Responsive rules are at the end, widest first (same breakpoints as site.css).
 */


.roi-hero-section,
.roi-calc-section,
.roi-ops-section,
.roi-method-section,
.roi-pdf {
    --roi-line: 0.7px solid var(--color-border);
    --roi-inset: 58px; /* the inner column sits this far in from the outer side lines */
    --roi-staff: var(--color-brand);
    --roi-software: #3f8a7e;
    --roi-growth: #a65a1f;
    --roi-fees: #b0478f;
    --roi-up: var(--color-success);
}

/* Two pairs of side lines, as in the design: the outer frame (the container's edges) and the
   inner column the content sits in. */
.roi-frame {
    padding-inline: var(--roi-inset);
    border-inline: var(--roi-line);
}

.roi-col {
    border-inline: var(--roi-line);
}

/* Small grey capitals over a figure ("RETURN", "ADMIN COST PER STUDENT"). */
.roi-label {
    margin: 0;
    color: #8a94a6;
    text-transform: uppercase;
}

/* ---------- Hero: white card over the top-left of the painting ---------- */
.roi-hero-section {
    padding-top: var(--space-7);
}

.roi-hero {
    position: relative;
    padding: 0 0 66px var(--roi-inset);
}

/* The painting starts 70px down, so the card stands over its top edge, and runs 66px past the
   card's bottom (as in the design). */
.roi-hero::before {
    content: "";
    position: absolute;
    inset: 70px 0 0;
    background: var(--roi-hero-bg, none) center / cover no-repeat var(--color-surface-muted);
}

/* Sizes from the design (Figma "Frame 1707487069"): 933 x 492 card, 857.52px content centred
   in it (37.8px each side), 31px above and below. */
.roi-hero__card {
    position: relative;
    max-width: 933px;
    padding: 31px 37.8px;
    border: var(--roi-line);
    background: var(--color-surface);
}

.roi-hero__eyebrow {
    margin: 0 0 9px; /* the title block starts 77px down the card */
    padding: var(--space-2) 0;
    color: #94a3b8;
}

.roi-hero__title {
    margin: 0;
}

.roi-hero__description {
    margin: 28px 0 52px;
}

/* 144 x 40, 16px medium (the design's "Nav Bar_Menu Link"). */
.roi-hero__button {
    min-width: 144px;
    min-height: 40px;
    padding: 7px 10px;
    border-color: var(--color-text-desc);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
}

/* ---------- Calculator ---------- */
/* 40px blank between the painting and the tabs; the side lines run through it. */
.roi-calc {
    padding-top: var(--space-7);
}

/* Institution type: the row's lines run out to the outer frame; square tabs inside the
   column, the open one filled with the brand colour. */
.roi-tabs-row {
    margin-inline: calc(-1 * var(--roi-inset) - 0.7px);
    padding-inline: calc(var(--roi-inset) + 0.7px);
    border-block: var(--roi-line);
}

.roi-tabs {
    display: flex;
    flex-wrap: wrap;
}

.roi-tabs__tab {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-right: var(--roi-line);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: var(--fs-h5);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.roi-tabs__tab:hover {
    background: var(--color-surface-hover);
}

.roi-tabs__tab.is-active {
    background: var(--color-brand);
    color: #fff;
}

.roi-calc__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 45px;
    border-top: var(--roi-line);
}

/* The five questions */
.roi-form {
    position: relative;
    padding: var(--space-6) var(--space-7) 180px;
    background: var(--color-surface-muted);
}

.roi-form__title {
    margin: 0;
}

.roi-form__text {
    margin: var(--space-1) 0 var(--space-7);
}

.roi-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6) var(--space-3);
    margin-top: var(--space-6);
}

.roi-field {
    grid-column: 1 / -1;
}

.roi-field--half {
    grid-column: auto;
}

.roi-field__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
}

.roi-field__label {
    display: block;
    margin-bottom: var(--space-3);
}

.roi-field__hint {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Select and number fields: white box, 44px tall. */
.roi-select,
.roi-number {
    position: relative;
    display: flex;
    align-items: center;
    height: 44px;
    border: var(--roi-line);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color 0.15s ease;
}

.roi-select:focus-within,
.roi-number:focus-within {
    border-color: var(--color-brand);
    outline: 2px solid var(--color-brand-soft);
}

.roi-select select,
.roi-number input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 var(--space-4);
    border: 0;
    background: none;
    color: var(--color-text);
    font: inherit;
    font-size: var(--fs-body);
    outline: none;
    appearance: none;
    -moz-appearance: textfield;
}

.roi-number input::-webkit-outer-spin-button,
.roi-number input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.roi-select select {
    padding-right: 40px;
    cursor: pointer;
}

.roi-select .icon {
    position: absolute;
    right: var(--space-4);
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.roi-number__prefix {
    padding-left: var(--space-4);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.roi-number--money input {
    padding-left: var(--space-2);
}

.roi-number__unit {
    padding-right: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--fs-tiny);
    white-space: nowrap;
}

/* Up / down arrows (the number field's own spinner is hidden). */
.roi-number__steps {
    display: flex;
    flex-direction: column;
    margin-right: var(--space-3);
}

.roi-number__steps button {
    display: grid;
    place-items: center;
    width: 18px;
    height: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text);
    cursor: pointer;
}

.roi-number__steps button:hover {
    color: var(--color-brand);
}

.roi-number__steps .icon {
    width: 12px;
    height: 12px;
}

.roi-number__steps button:first-child .icon {
    transform: rotate(180deg);
}

/* Students slider: brand fill up to the thumb (--fill, set by roi.js). */
.roi-range {
    --fill: 20%;
    width: 100%;
    height: 10px;
    margin: var(--space-5) 0 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(var(--color-brand), var(--color-brand)) 0 / var(--fill) 100% no-repeat, #e4e4e7;
    cursor: pointer;
    appearance: none;
}

.roi-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--color-brand);
    appearance: none;
}

.roi-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--color-brand);
}

.roi-range:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 4px;
}

.roi-form__mosaic {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 280px;
    pointer-events: none;
}

/* Results: dark headline with the chart, three figures, then the value by source. */
.roi-results {
    display: flex;
    flex-direction: column;
    border-left: var(--roi-line);
}

.roi-results__head {
    padding: var(--space-6) var(--space-5) var(--space-5);
    background: var(--color-dark);
    color: #fff;
}

.roi-results__eyebrow {
    margin: 0;
    text-transform: uppercase;
}

.roi-results__value {
    margin: var(--space-2) 0 0;
}

.roi-results__value {
    margin: var(--space-2) 0 0;
    color: #fff;
}

.roi-results__sub {
    margin: var(--space-1) 0 var(--space-4);
    color: #d4d4d8;
}

.roi-chart {
    margin: 0;
    padding: var(--space-5) var(--space-5) var(--space-3);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

.roi-chart figcaption {
    display: grid;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
}

.roi-chart__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.roi-chart__area {
    fill: #bcbcef;
}

.roi-chart__line {
    fill: none;
    stroke: var(--color-brand);
    stroke-width: 1.5;
}

.roi-chart__zero {
    stroke: #d4d4d8;
    stroke-width: 1;
}

.roi-chart__break {
    stroke: var(--roi-up);
    stroke-width: 1.2;
    stroke-dasharray: 3 3;
}

.roi-chart__break-label {
    fill: var(--roi-up);
    font-size: 11px;
}

.roi-chart__dot {
    fill: var(--color-surface);
    stroke: var(--color-brand);
    stroke-width: 2;
}

.roi-chart__end {
    fill: var(--color-brand);
    font-size: 12px;
    font-weight: var(--fw-semibold);
}

.roi-chart__axis {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
    color: #a1a1aa;
    font-size: var(--fs-tiny);
}

/* Return / Payback / Time freed */
.roi-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-bottom: var(--roi-line);
}

.roi-stats__item {
    padding: var(--space-5);
}

.roi-stats__item + .roi-stats__item {
    border-left: var(--roi-line);
}

.roi-stats dd {
    display: grid;
    margin: var(--space-2) 0 0;
}

/* Where the value comes from: name at the left, a bar sized to the largest source. */
.roi-sources {
    flex: 1;
    padding: var(--space-6) var(--space-5);
}

.roi-sources__title {
    margin: 0;
}

.roi-sources__text {
    margin: var(--space-2) 0 var(--space-6);
}

.roi-sources__list {
    display: grid;
    gap: var(--space-6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.roi-sources__row {
    --bar: var(--roi-staff);
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4);
    font-size: var(--fs-small);
}

.roi-sources__row--software { --bar: var(--roi-software); }
.roi-sources__row--growth { --bar: var(--roi-growth); }
.roi-sources__row--fees { --bar: var(--roi-fees); }

.roi-sources__name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.roi-sources__name::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--bar);
}

/* The bar takes what the amount leaves of the row. */
.roi-sources__bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-right: 6em;
}

.roi-sources__bar i {
    flex: none;
    height: 14px;
    border-radius: 2px;
    background: var(--bar);
    transition: width 0.3s ease;
}

.roi-sources__bar b {
    margin-right: -6em;
    font-weight: var(--fw-medium);
    white-space: nowrap;
}

/* Assumptions: lavender bar that opens onto the full model. */
.roi-assume {
    border-block: var(--roi-line);
    background: var(--color-brand-soft);
}

.roi-assume__summary {
    position: relative;
    display: grid;
    gap: var(--space-1);
    padding: var(--space-5) 64px var(--space-5) var(--space-5);
    cursor: pointer;
    list-style: none;
}

.roi-assume__summary::-webkit-details-marker {
    display: none;
}

/* Small triangle at the right; points down when open. */
.roi-assume__summary::after {
    content: "";
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    border-block: 5px solid transparent;
    border-left: 6px solid var(--color-text);
    transition: transform 0.2s ease;
}

.roi-assume[open] .roi-assume__summary::after {
    transform: rotate(90deg);
}

.roi-assume__text {
    max-width: 600px;
}

/* Open: a white card on the lavender with the two sets and the fields in two columns. */
.roi-assume__panel {
    margin: 0 var(--space-5) var(--space-5);
    padding: var(--space-5) var(--space-5) var(--space-3);
    border-radius: var(--radius);
    background: var(--color-surface);
}

/* Conservative / Expected */
.roi-assume__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.roi-assume__tab {
    width: 216px;
    min-height: 40px;
    padding: 0 var(--space-4);
    border: 0.7px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.roi-assume__tab:hover {
    color: var(--color-text);
}

.roi-assume__tab.is-active {
    border-color: var(--color-brand);
    color: var(--color-brand);
    font-weight: var(--fw-semibold);
}

/* Two columns with a line between them (the line is the right column's left border). */
.roi-assume__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1100px;
    margin-top: var(--space-6);
    padding-inline: 20px;
}

.roi-assume__col {
    padding-right: 36px;
}

.roi-assume__col + .roi-assume__col {
    padding-right: 0;
    padding-left: 46px;
    border-left: var(--roi-line);
}

.roi-assume__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 124px;
    align-items: start;
    gap: 30px;
    padding: 20px 0 22px;
}

.roi-assume__row + .roi-assume__row {
    border-top: var(--roi-line);
}

.roi-assume__label,
.roi-assume__hint {
    display: block;
}

.roi-assume__hint {
    margin-top: var(--space-1);
}

/* Small number field: the value, its up / down arrows right after it, the unit at the end. */
.roi-number--small {
    height: 40px;
    padding-inline: var(--space-3) 18px;
}

.roi-number--small input {
    flex: none;
    width: 5ch; /* roi.js fits it to the value, so the arrows sit right after it */
    padding: 0;
}

.roi-number--small .roi-number__steps {
    margin: 0 0 0 6px;
}

.roi-number--small .roi-number__unit {
    margin-left: auto;
    padding: 0;
    font-size: var(--fs-small);
}

/* ---------- What this means operationally: six figures, 3 x 2 ----------
 * Grey cards with white gutters between them; the gutters keep their side lines all the way
 * down, through the white row gap too (as in the design). */
.roi-ops__head {
    padding: var(--space-7) 28px 36px;
}

.roi-ops__title {
    margin: 0;
}

.roi-ops__text {
    margin: var(--space-2) 0 0;
}

.roi-ops__grid {
    --gutter: 34px;
    --cell: calc((100% - 2 * var(--gutter)) / 3);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px var(--gutter);
    margin: 0;
    border-top: var(--roi-line);
    background:
        linear-gradient(var(--color-border), var(--color-border)) var(--cell) 0 / 0.7px 100% no-repeat,
        linear-gradient(var(--color-border), var(--color-border)) calc(var(--cell) + var(--gutter)) 0 / 0.7px 100% no-repeat,
        linear-gradient(var(--color-border), var(--color-border)) calc(2 * var(--cell) + var(--gutter)) 0 / 0.7px 100% no-repeat,
        linear-gradient(var(--color-border), var(--color-border)) calc(2 * var(--cell) + 2 * var(--gutter)) 0 / 0.7px 100% no-repeat;
}

.roi-ops__item {
    padding: 22px 26px;
    border-bottom: var(--roi-line);
    background: #fafafa;
}

/* Second row: its own top line under the white gap. */
.roi-ops__item:nth-child(n + 4) {
    border-top: var(--roi-line);
}

.roi-ops__item dd {
    display: grid;
    margin: var(--space-2) 0 0;
}

.roi-ops__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.roi-ops__arrow {
    display: inline-flex;
    color: var(--roi-up);
}

.roi-ops__arrow svg {
    width: 0.8em;
    height: 0.8em;
}

.roi-ops__note {
    margin-top: var(--space-1);
}

/* The mosaic band under the figures stays inside the column (divider, 'container' => false). */
.roi-ops .mosaic-band {
    border-top: 0;
}

/* ---------- Investment (left) and the report on the painting (right) ---------- */
.roi-invest {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.roi-invest__cost {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    background: #f1f4f9;
}

.roi-invest__title {
    margin: 0 0 var(--space-5);
}

.roi-invest__list {
    margin: 0 0 var(--space-8);
}

.roi-invest__row {
    position: relative;
    padding: var(--space-4) 48px var(--space-4) 0;
    border-bottom: var(--roi-line);
}

.roi-invest__row dd {
    margin: 2px 0 0;
}

/* "Your annual subscription estimate": label at the left, the number box (as in the
   assumptions panel) at the row's right end. */
.roi-invest__row--edit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding-right: 0;
}

.roi-invest__row--edit[hidden] {
    display: none;
}

.roi-invest__row--edit dd {
    margin: 0;
}

.roi-invest__row--edit .roi-number {
    width: 124px;
}

.roi-invest__row--total {
    display: flex;
    justify-content: space-between;
    padding-right: 0;
    border-bottom: 0;
}

.roi-invest__row--total dt,
.roi-invest__row--total dd {
    margin: 0;
}

.roi-invest__edit {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: #6772e5; /* the design's edit icon colour */
    cursor: pointer;
}

.roi-invest__edit:hover,
.roi-invest__edit.is-active {
    background: var(--color-brand-soft);
}

.roi-invest__edit .icon {
    width: 24px;
    height: 24px;
}

.roi-invest__note {
    margin: auto 0 0;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    background: #f8f9fa;
}

.roi-report {
    padding: 30px 26px;
    background: var(--roi-report-bg, none) center / cover no-repeat var(--color-surface-muted);
}

.roi-report__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 30px;
    background: var(--color-surface);
}

.roi-report__title {
    margin: 0;
}

.roi-report__text {
    margin: var(--space-2) 0 var(--space-8);
}

.roi-report__fields {
    display: grid;
    gap: var(--space-5);
    margin-bottom: var(--space-7);
}

.roi-report__fields input {
    width: 100%;
    height: 44px;
    padding: 0 var(--space-4);
    border: var(--roi-line);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: var(--fs-ui);
}

.roi-report__fields input:focus {
    border-color: var(--color-brand);
    outline: 2px solid var(--color-brand-soft);
}

.roi-report__fields input[aria-invalid="true"] {
    border-color: #dc2626;
}

.roi-report__message {
    margin: 0;
    color: var(--color-success);
}

.roi-report__message.is-error {
    color: #dc2626;
}

.roi-report__actions {
    margin-top: auto;
}

.roi-report__actions .is-loading {
    opacity: 0.6;
    cursor: progress;
}

/* ---------- Methodology & honesty notes ---------- */
.roi-method {
    padding: var(--space-7) var(--roi-inset) var(--space-8);
    border: var(--roi-line);
}

.roi-method__title {
    margin: 0 0 var(--space-4);
}

.roi-method p {
    margin: 0 0 var(--space-3);
}

/* The closing box right below: one line between them, not two. */
.roi-method-section + .cta-section .cta {
    border-top: 0;
}

/* ---------- PDF report (drawn off screen while the PDF is made; A4 at 96dpi) ---------- */
.roi-pdf__page {
    box-sizing: border-box;
    width: 794px;
    height: 1123px;
    padding: 48px 56px;
    overflow: hidden;
    background: #fff;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.5;
}

.roi-pdf__page + .roi-pdf__page {
    margin-top: 20px;
}

.roi-pdf__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.roi-pdf__header img {
    width: 125px;
    height: auto;
}

.roi-pdf__eyebrow {
    margin: 24px 0 4px;
    color: var(--color-text-muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.roi-pdf__title {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: var(--fw-medium);
    line-height: 1.2;
}

.roi-pdf__hero {
    padding: 4px 20px 16px;
    background: var(--color-dark);
    color: #fff;
}

.roi-pdf__hero .roi-pdf__eyebrow {
    margin-top: 12px;
    color: #d4d4d8;
}

.roi-pdf__hero p {
    margin: 0;
}

.roi-pdf__big {
    font-size: 34px;
    font-weight: var(--fw-bold);
    line-height: 1.2;
}

.roi-pdf__chart {
    padding: 16px 20px 8px;
    border: 1px solid var(--color-border);
    border-top: 0;
}

.roi-pdf__h2 {
    margin: 22px 0 8px;
    font-size: 15px;
    font-weight: var(--fw-semibold);
}

.roi-pdf__h2 small {
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: var(--fw-regular);
}

.roi-pdf__table,
.roi-pdf__stats table {
    width: 100%;
    border-collapse: collapse;
}

.roi-pdf__table td,
.roi-pdf__stats td {
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.roi-pdf__table td:last-child,
.roi-pdf__stats td:last-child {
    padding-left: 16px;
    font-weight: var(--fw-semibold);
    text-align: right;
}

.roi-pdf__stats {
    margin-top: 12px;
}

.roi-pdf__note {
    margin: 0 0 8px;
    color: var(--color-text-secondary);
    font-size: 11px;
}

.roi-pdf__footer {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 11px;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .roi-form {
        padding-inline: var(--space-6);
    }

    .roi-sources__row {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .roi-ops__value {
        font-size: var(--fs-h3);
    }
}

@media (max-width: 1099.98px) {
    .roi-hero-section,
    .roi-calc-section,
    .roi-ops-section,
    .roi-method-section {
        --roi-inset: 28px;
    }

    .roi-calc__body,
    .roi-invest {
        grid-template-columns: minmax(0, 1fr);
    }

    .roi-form {
        padding-bottom: var(--space-7);
    }

    .roi-form__mosaic {
        display: none;
    }

    .roi-results {
        border-top: var(--roi-line);
        border-left: 0;
    }

    .roi-assume__grid {
        grid-template-columns: minmax(0, 1fr);
        padding-inline: 0;
    }

    .roi-assume__col,
    .roi-assume__col + .roi-assume__col {
        padding-inline: 0;
        border-left: 0;
    }

    .roi-assume__col + .roi-assume__col .roi-assume__row:first-child {
        border-top: var(--roi-line);
    }

    .roi-ops__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        background: none;
    }

    .roi-ops__item:nth-child(n + 4) {
        border-top: 0;
    }

    .roi-ops__item:nth-child(odd) {
        border-right: var(--roi-line);
    }

    .roi-report {
        padding: var(--space-5);
    }
}

@media (max-width: 768px) {
    /* One pair of side lines on small screens. */
    .roi-hero-section,
    .roi-calc-section,
    .roi-ops-section,
    .roi-method-section {
        --roi-inset: 0px;
    }

    .roi-col {
        border-inline: 0;
    }

    .roi-method {
        padding-inline: var(--space-5);
    }

    .roi-hero {
        padding: 0 var(--space-4) var(--space-6);
    }

    .roi-hero::before {
        inset: 48px 0 0;
    }

    .roi-hero__card {
        padding: var(--space-5);
    }

    .roi-hero__description {
        margin-bottom: var(--space-5);
    }

    .roi-tabs__tab {
        flex: 1 1 auto;
        font-size: var(--fs-small);
    }

    .roi-calc__body {
        margin-top: var(--space-5);
    }

    .roi-chart {
        padding: var(--space-4);
    }

    .roi-stats__item {
        padding: var(--space-4);
    }

    .roi-sources__row {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2);
    }

    .roi-ops__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .roi-ops__item:nth-child(odd) {
        border-right: 0;
    }

    .roi-ops__head,
    .roi-invest__cost,
    .roi-report__card {
        padding: var(--space-5);
    }

    .roi-method {
        padding: var(--space-6) var(--space-5);
    }
}

@media (max-width: 559.98px) {
    .roi-hero__description br {
        display: none;
    }

    .roi-form {
        padding: var(--space-5) var(--space-4);
    }

    .roi-form__text {
        margin-bottom: var(--space-5);
    }

    .roi-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .roi-field--half {
        grid-column: 1 / -1;
    }

    .roi-field__head {
        flex-wrap: wrap;
        gap: 0 var(--space-3);
    }

    .roi-results__head,
    .roi-sources {
        padding-inline: var(--space-4);
    }

    .roi-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .roi-stats__item + .roi-stats__item {
        border-top: var(--roi-line);
        border-left: 0;
    }

    .roi-assume__summary {
        padding-inline: var(--space-4) 48px;
    }

    .roi-assume__summary::after {
        right: var(--space-5);
    }

    .roi-assume__panel {
        margin-inline: var(--space-3);
        padding: var(--space-4);
    }

    .roi-assume__row {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2);
    }

    .roi-assume__tabs {
        gap: var(--space-3);
    }

    .roi-assume__tab {
        flex: 1 1 0;
        width: auto;
    }

    .roi-invest__row--edit {
        flex-wrap: wrap;
    }

    .roi-report {
        padding: var(--space-3);
    }

    .roi-report__actions .btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .roi-sources__bar i,
    .roi-assume__summary::after {
        transition: none;
    }
}
