/*
 * B86 Rekentools: the step flow widget (briefing Fase D §4d).
 *
 * Mobile first, BEM classes under .b86-rt, nothing outside the widget, no !important, no id
 * selectors and no colour values of its own: colours and fonts come from the Global Colors and
 * Global Fonts of the Elementor kit through the custom properties below, with fallbacks that inherit
 * from the page when there is no kit. Only the four system colours and the system typographies are
 * used; custom kit colours have site-specific ids. Tints and lines are mixed from those colours.
 *
 * The look follows the site: square white fields without a border (as the kit draws the inputs of
 * the contact form), thin accent lines, flat pill buttons and an outlined pill for the secondary
 * action. White is the CSS system colour Field, the background browsers give a text input, so cards
 * match the inputs; --b86-rt-surface can be set to something else on a page.
 *
 * The widget fills its column. The layout answers to the width of the widget, not of the screen
 * (container queries), because the page puts it in a column beside the sidebar. Text fields that
 * follow each other share a row; a field on its own fills the row. Lists of options fill whole rows
 * too, a last option on its own spans the row.
 *
 * The kit has no global button style, but the Additional CSS of the site forces the primary colour
 * on every button.elementor-button in a form (with !important). The primary buttons and the contact
 * link therefore follow that house style: the primary colour as a pill, the white text of
 * .elementor-button from Elementor, the accent typography of the kit. The secondary buttons (back,
 * start over) do not carry .elementor-button for that reason and copy the outlined button of the
 * site instead.
 *
 * Some selectors carry an element or an extra class on purpose: they must outrank the kit and theme
 * rules for buttons and inputs whatever order the stylesheets load in.
 */

.b86-rt {
    --b86-rt-text: var(--e-global-color-text, inherit);
    --b86-rt-heading: var(--e-global-color-secondary, currentColor);
    --b86-rt-accent: var(--e-global-color-accent, currentColor);
    --b86-rt-primary: var(--e-global-color-primary, currentColor);
    --b86-rt-font: var(--e-global-typography-text-font-family, inherit);
    --b86-rt-font-heading: var(--e-global-typography-secondary-font-family, inherit);
    --b86-rt-font-button: var(--e-global-typography-accent-font-family, inherit);
    --b86-rt-surface: Field;
    --b86-rt-line: color-mix(in srgb, var(--b86-rt-heading) 18%, transparent);
    --b86-rt-line-accent: color-mix(in srgb, var(--b86-rt-accent) 75%, transparent);
    --b86-rt-hover: color-mix(in srgb, var(--b86-rt-heading) 40%, transparent);
    --b86-rt-tint: color-mix(in srgb, var(--b86-rt-accent) 16%, transparent);
    --b86-rt-gap: 1.25rem;
    /*
     * One gap between inputs side by side, everywhere, and down within a group (options, tiles,
     * groeipakket), as in the contact form of the site (15 px).
     */
    --b86-rt-input-gap: 0.9375rem;
    /* Down between groups (a label with its input or options): more room, so a group reads as one. */
    --b86-rt-group-gap: 1.75rem;

    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    container: b86-rt / inline-size;
    color: var(--b86-rt-text);
    font-family: var(--b86-rt-font);
    /* Room for the sticky header of the site on small screens when a step change scrolls to the widget. */
    scroll-margin-top: 6rem;
}

.b86-rt *,
.b86-rt *::before,
.b86-rt *::after {
    box-sizing: border-box;
}

/* Progress. */

.b86-rt .b86-rt__progress-wrap {
    margin: 0 0 calc(var(--b86-rt-gap) * 1.5);
}

.b86-rt .b86-rt__progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.5rem;
    font-size: 0.8em;
    font-weight: 600;
    line-height: 1.3;
}

.b86-rt .b86-rt__progress {
    margin: 0;
    font-size: 1em;
}

.b86-rt .b86-rt__percent {
    color: var(--b86-rt-heading);
    font-variant-numeric: tabular-nums;
}

.b86-rt .b86-rt__bar {
    height: 0.3rem;
    overflow: hidden;
    background-color: color-mix(in srgb, var(--b86-rt-accent) 35%, transparent);
}

.b86-rt .b86-rt__bar-fill {
    height: 100%;
    background-color: var(--b86-rt-heading);
    transition: width 0.4s ease;
}

/* Steps. */

.b86-rt .b86-rt__form,
.b86-rt .b86-rt__step,
.b86-rt .b86-rt__choices {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.b86-rt .b86-rt__step {
    animation: b86-rt-step-in 0.3s ease both;
}

.b86-rt .b86-rt__step-legend {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.b86-rt .b86-rt__step-title {
    margin: 0 0 0.75rem;
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font-heading);
    font-size: 1.3em;
    font-weight: var(--e-global-typography-secondary-font-weight, 700);
    line-height: var(--e-global-typography-secondary-line-height, 1.2);
}

.b86-rt .b86-rt__intro {
    margin: 0 0 var(--b86-rt-group-gap);
}

.b86-rt .b86-rt__noscript {
    margin: 0 0 var(--b86-rt-gap);
    padding: 0.75rem 1rem;
    border-inline-start: 2px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-tint);
}

/*
 * The fields of a step, on a grid. Every field fills a row. In a wide enough widget two amounts after
 * each other share a row, and so do the ages (two, or all of them in one row); a last age on its own
 * fills its row. Hidden fields are no grid items, so the rules look at which ages are shown.
 *
 * A text field spans four rows it shares with its neighbours through subgrid: label, input, error
 * and help. So the inputs of a row line up when one label takes two lines, and an error or an open
 * help text only makes room under the inputs.
 */

.b86-rt .b86-rt__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    column-gap: var(--b86-rt-input-gap);
}

.b86-rt .b86-rt__fields > * {
    grid-column: 1 / -1;
    min-width: 0;
}

.b86-rt .b86-rt__fields > .b86-rt__field--amount,
.b86-rt .b86-rt__fields > .b86-rt__field--percentage,
.b86-rt .b86-rt__fields > .b86-rt__field--integer {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr);
    align-self: stretch;
}

.b86-rt .b86-rt__fields > .b86-rt__field > .b86-rt__label-row {
    grid-row: 1;
    align-self: end;
}

.b86-rt .b86-rt__fields > .b86-rt__field > .b86-rt__control {
    grid-row: 2;
}

.b86-rt .b86-rt__fields > .b86-rt__field > .b86-rt__error {
    grid-row: 3;
    align-self: start;
}

.b86-rt .b86-rt__fields > .b86-rt__field > .b86-rt__tip {
    grid-row: 4;
    align-self: start;
    margin: 0.5rem 0 0;
}

@container b86-rt (min-width: 34rem) {
    .b86-rt .b86-rt__fields {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .b86-rt .b86-rt__fields > .b86-rt__field--amount:has(+ .b86-rt__field--amount),
    .b86-rt .b86-rt__fields > .b86-rt__field--amount + .b86-rt__field--amount {
        grid-column: span 6;
    }
}

/* Two ages per row; with three, the third fills its row. */
@container b86-rt (34rem <= width < 52rem) {
    .b86-rt .b86-rt__fields > .b86-rt__field--integer {
        grid-column: span 6;
    }

    .b86-rt .b86-rt__fields:not(:has(> .b86-rt__field--integer[data-b86-row="1"]:not([hidden]))) > .b86-rt__field--integer,
    .b86-rt .b86-rt__fields:not(:has(> .b86-rt__field--integer[data-b86-row="3"]:not([hidden]))) > .b86-rt__field--integer[data-b86-row="2"] {
        grid-column: 1 / -1;
    }
}

/* All ages in one row. */
@container b86-rt (min-width: 52rem) {
    .b86-rt .b86-rt__fields > .b86-rt__field--integer {
        grid-column: span 3;
    }

    .b86-rt .b86-rt__fields:not(:has(> .b86-rt__field--integer[data-b86-row="3"]:not([hidden]))) > .b86-rt__field--integer {
        grid-column: span 4;
    }

    .b86-rt .b86-rt__fields:not(:has(> .b86-rt__field--integer[data-b86-row="2"]:not([hidden]))) > .b86-rt__field--integer {
        grid-column: span 6;
    }

    .b86-rt .b86-rt__fields:not(:has(> .b86-rt__field--integer[data-b86-row="1"]:not([hidden]))) > .b86-rt__field--integer {
        grid-column: 1 / -1;
    }
}

/* Fields, labels and help. */

.b86-rt .b86-rt__field {
    min-width: 0;
    margin: 0 0 var(--b86-rt-group-gap);
}

/* Label and help button flow as text: the button follows the last word, also of a long label. */
.b86-rt .b86-rt__label-row {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.85em;
    line-height: 1.3;
}

.b86-rt .b86-rt__label-row > .b86-rt__label {
    display: inline;
    font-size: inherit;
}

/* [type] outranks the hover and focus states of the help button, which reset its margin. */
.b86-rt .b86-rt__label-row > button.b86-rt__help[type] {
    margin-inline-start: 0.4rem;
    vertical-align: -0.2em;
}

.b86-rt .b86-rt__label,
.b86-rt .b86-rt__legend {
    display: block;
    margin: 0;
    padding: 0;
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font);
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.3;
}

.b86-rt .b86-rt__legend {
    float: left;
    max-width: calc(100% - 2.5rem);
    margin: 0 0.5rem 0.4rem 0;
}

.b86-rt .b86-rt__choices > .b86-rt__help {
    float: left;
}

.b86-rt .b86-rt__choices > .b86-rt__tip,
.b86-rt .b86-rt__options,
.b86-rt .b86-rt__grid-head,
.b86-rt .b86-rt__grid-row {
    clear: both;
}

.b86-rt button.b86-rt__help,
.b86-rt button.b86-rt__help:hover,
.b86-rt button.b86-rt__help:focus {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--b86-rt-heading);
    border-radius: 50%;
    background-color: transparent;
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.b86-rt button.b86-rt__help[aria-expanded="true"],
.b86-rt button.b86-rt__help[aria-expanded="true"]:hover,
.b86-rt button.b86-rt__help[aria-expanded="true"]:focus {
    border-color: var(--b86-rt-heading);
    background-color: var(--b86-rt-heading);
    color: var(--b86-rt-accent);
}

.b86-rt .b86-rt__tip {
    margin: 0 0 0.5rem;
    padding: 0.6rem 0.8rem;
    border-inline-start: 2px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-tint);
    font-size: 0.8em;
    line-height: 1.45;
}

/* Text inputs: a white box as the kit draws it, the unit inside it. */

.b86-rt .b86-rt__control {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    background-color: var(--b86-rt-surface);
}

.b86-rt .b86-rt__control:focus-within {
    outline: 2px solid var(--b86-rt-heading);
    outline-offset: 2px;
}

.b86-rt .b86-rt__control input.b86-rt__input[type] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: var(--b86-rt-text);
}

.b86-rt .b86-rt__control input.b86-rt__input[type]:focus,
.b86-rt .b86-rt__control input.b86-rt__input[type]:focus-visible {
    outline: 0;
    box-shadow: none;
}

.b86-rt .b86-rt__unit {
    display: flex;
    flex: none;
    align-items: center;
    padding: 0 0.9rem;
    color: var(--b86-rt-heading);
    font-weight: 600;
    font-size: 0.85em;
}

.b86-rt .b86-rt__unit:first-child {
    padding-inline-end: 0;
}

.b86-rt .b86-rt__control input.b86-rt__input[type] + .b86-rt__unit {
    padding-inline-start: 0;
}

/*
 * Errors. The kit has no error colour, so the accent colour marks an error: a frame around the input
 * and a light accent strip right under it with an accent icon and the message in the primary colour.
 * The dark frame of a chosen option stays reserved for a choice.
 */

.b86-rt .b86-rt__field--invalid .b86-rt__control {
    box-shadow: inset 0 0 0 2px var(--b86-rt-accent);
}

.b86-rt .b86-rt__field--invalid .b86-rt__options--radio > .b86-rt__option,
.b86-rt .b86-rt__field--invalid .b86-rt__options--checkboxes > .b86-rt__option,
.b86-rt .b86-rt__field--invalid .b86-rt__options--choice-tiles .b86-rt__option-label {
    box-shadow: inset 0 0 0 2px var(--b86-rt-accent);
}

.b86-rt .b86-rt__error {
    position: relative;
    margin: 0;
    padding: 0.55rem 0.9rem 0.55rem 2.6rem;
    background-color: color-mix(in srgb, var(--b86-rt-accent) 30%, var(--b86-rt-surface));
    color: var(--b86-rt-primary);
    font-size: 0.8em;
    font-weight: 500;
    line-height: 1.4;
    animation: b86-rt-error-in 0.2s ease both;
}

/* Under a list of options the strip keeps the gap the options keep among each other. */
.b86-rt .b86-rt__choices + .b86-rt__error,
.b86-rt .b86-rt__field--consent .b86-rt__error {
    margin-top: var(--b86-rt-input-gap);
}

.b86-rt .b86-rt__error::before,
.b86-rt .b86-rt__summary::before,
.b86-rt .b86-rt__status--error::before {
    content: "!" / "";
    position: absolute;
    top: 0.55rem;
    left: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background-color: var(--b86-rt-accent);
    color: var(--b86-rt-primary);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.b86-rt .b86-rt__error::before {
    top: calc(0.55rem + 0.15em);
}

.b86-rt .b86-rt__error a {
    color: inherit;
    text-decoration: underline;
}

/* Choices: tiles, and radios and checkboxes as white boxes. */

.b86-rt .b86-rt__options {
    display: grid;
    gap: var(--b86-rt-input-gap);
}

.b86-rt .b86-rt__option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-width: 0;
}

.b86-rt .b86-rt__options--radio,
.b86-rt .b86-rt__options--checkboxes {
    grid-template-columns: minmax(0, 1fr);
}

.b86-rt .b86-rt__options--radio > .b86-rt__option,
.b86-rt .b86-rt__options--checkboxes > .b86-rt__option {
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: var(--b86-rt-surface);
    transition: box-shadow 0.15s ease;
}

.b86-rt .b86-rt__options--radio > .b86-rt__option:hover,
.b86-rt .b86-rt__options--checkboxes > .b86-rt__option:hover {
    box-shadow: inset 0 0 0 1px var(--b86-rt-hover);
}

.b86-rt .b86-rt__options--radio > .b86-rt__option:has(input:checked),
.b86-rt .b86-rt__options--checkboxes > .b86-rt__option:has(input:checked) {
    box-shadow: inset 0 0 0 2px var(--b86-rt-heading);
}

/* The whole box is the label: a click anywhere on it chooses the option. */
.b86-rt .b86-rt__options--radio .b86-rt__option-label::after,
.b86-rt .b86-rt__options--checkboxes .b86-rt__option-label::after {
    content: "";
    position: absolute;
    inset: 0;
}

.b86-rt .b86-rt__option > input.b86-rt__option-input[type] {
    flex: none;
    width: 1.15em;
    height: 1.15em;
    margin: 0.15em 0 0;
    padding: 0;
    accent-color: var(--b86-rt-heading);
    cursor: pointer;
}

.b86-rt .b86-rt__options--radio > .b86-rt__option > input.b86-rt__option-input[type],
.b86-rt .b86-rt__options--checkboxes > .b86-rt__option > input.b86-rt__option-input[type] {
    margin: 0;
}

.b86-rt .b86-rt__option-label {
    display: block;
    min-width: 0;
    margin: 0;
    color: var(--b86-rt-text);
    font-family: var(--b86-rt-font);
    font-size: 0.85em;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.b86-rt .b86-rt__options--choice-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.b86-rt .b86-rt__options--choice-tiles .b86-rt__option > input.b86-rt__option-input[type] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.b86-rt .b86-rt__options--choice-tiles .b86-rt__option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.75rem;
    background-color: var(--b86-rt-surface);
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font-heading);
    font-size: 1.2em;
    font-weight: 700;
    transition: box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.b86-rt .b86-rt__options--choice-tiles .b86-rt__option-label:hover {
    box-shadow: inset 0 0 0 1px var(--b86-rt-hover);
}

.b86-rt .b86-rt__options--choice-tiles input:checked + .b86-rt__option-label {
    background-color: var(--b86-rt-heading);
    color: var(--b86-rt-accent);
}

.b86-rt .b86-rt__options--choice-tiles input:focus-visible + .b86-rt__option-label {
    outline: 3px solid var(--b86-rt-heading);
    outline-offset: 3px;
}

/*
 * The groeipakket grid: a block per child with the fields under each other in a narrow widget (two
 * side by side clip an amount in a 258 px widget), a table from a widget of 40rem.
 */

.b86-rt .b86-rt__grid-head {
    display: none;
}

.b86-rt .b86-rt__grid-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--b86-rt-input-gap);
    margin: 0 0 var(--b86-rt-input-gap);
    padding: var(--b86-rt-input-gap);
    background-color: var(--b86-rt-tint);
}

.b86-rt .b86-rt__grid-row-label {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--b86-rt-heading);
    font-weight: 600;
    font-size: 0.85em;
}

.b86-rt .b86-rt__grid-row .b86-rt__field {
    margin: 0;
}

.b86-rt .b86-rt__grid-label {
    font-weight: 400;
}

/* Summary, status lines and navigation. */

/* The summary names the fields to check; their messages stay at the fields. */
.b86-rt .b86-rt__summary {
    position: relative;
    clear: both;
    margin: 0 0 var(--b86-rt-gap);
    padding: 0.85rem 1rem 0.85rem 3rem;
    border-inline-start: 4px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-tint);
    font-size: 0.85em;
    animation: b86-rt-error-in 0.2s ease both;
}

.b86-rt .b86-rt__summary::before,
.b86-rt .b86-rt__status--error::before {
    top: 0.95rem;
    left: 1rem;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.85rem;
}

.b86-rt .b86-rt__summary p {
    margin: 0 0 0.25rem;
    color: var(--b86-rt-heading);
    font-weight: 600;
}

.b86-rt .b86-rt__summary ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.b86-rt .b86-rt__summary li {
    margin: 0;
}

.b86-rt .b86-rt__summary a,
.b86-rt .b86-rt__option-label a,
.b86-rt .b86-rt__disclaimer a,
.b86-rt .b86-rt__status a {
    color: inherit;
    text-decoration: underline;
}

.b86-rt .b86-rt__status {
    margin: 0 0 var(--b86-rt-gap);
}

/* Under the report button, inside the frame of the report: no room left below it. */
.b86-rt .b86-rt__report-status {
    margin: var(--b86-rt-input-gap) 0 0;
}

.b86-rt .b86-rt__status:empty,
.b86-rt .b86-rt__report-status:empty {
    margin: 0;
}

.b86-rt .b86-rt__status--busy,
.b86-rt .b86-rt__status--error,
.b86-rt .b86-rt__status--success {
    padding: 0.75rem 1rem;
    border-inline-start: 2px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-tint);
    font-size: 0.9em;
}

.b86-rt .b86-rt__status--error {
    position: relative;
    padding-inline-start: 3rem;
    border-inline-start: 4px solid var(--b86-rt-accent);
}

.b86-rt .b86-rt__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: var(--b86-rt-gap) 0 0;
    padding: var(--b86-rt-gap) 0 0;
    border-top: 1px solid var(--b86-rt-line-accent);
}

/*
 * No text colour here: .elementor-button of Elementor sets white text in every state, and the site
 * forces the primary colour behind form buttons, so a colour of our own would only disagree with it.
 */
.b86-rt .b86-rt__button.elementor-button,
.b86-rt .b86-rt__contact-link.elementor-button {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin: 0;
    padding: 0.9rem 1.75rem;
    border: 0;
    border-radius: 50px;
    background-color: var(--b86-rt-primary);
    font-family: var(--b86-rt-font-button);
    font-size: var(--e-global-typography-accent-font-size, 0.9rem);
    font-weight: var(--e-global-typography-accent-font-weight, 700);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: var(--e-global-typography-accent-text-transform, none);
    white-space: normal;
    cursor: pointer;
}

.b86-rt .b86-rt__button.elementor-button:hover,
.b86-rt .b86-rt__button.elementor-button:focus,
.b86-rt .b86-rt__contact-link.elementor-button:hover,
.b86-rt .b86-rt__contact-link.elementor-button:focus {
    background-color: var(--b86-rt-primary);
    text-decoration: underline;
}

.b86-rt .b86-rt__button.elementor-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* The outlined button of the site: a thin accent line, filled with the accent colour on hover. */
.b86-rt button.b86-rt__button--secondary,
.b86-rt button.b86-rt__button--secondary:hover,
.b86-rt button.b86-rt__button--secondary:focus {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin: 0;
    padding: 0.9rem 1.75rem;
    border: 1px solid var(--b86-rt-line-accent);
    border-radius: 50px;
    background-color: transparent;
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font-button);
    font-size: var(--e-global-typography-accent-font-size, 0.9rem);
    font-weight: var(--e-global-typography-accent-font-weight, 700);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: var(--e-global-typography-accent-text-transform, none);
    letter-spacing: normal;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.b86-rt button.b86-rt__button--secondary:hover {
    border-color: var(--b86-rt-accent);
    background-color: var(--b86-rt-accent);
    color: var(--b86-rt-primary);
}

.b86-rt button.b86-rt__button--secondary:disabled {
    cursor: wait;
    opacity: 0.6;
}

.b86-rt .b86-rt__nav > .b86-rt__button--next,
.b86-rt .b86-rt__nav > .b86-rt__button--calculate,
.b86-rt .b86-rt__nav > .b86-rt__button--restart {
    margin-inline-start: auto;
}

.b86-rt :focus-visible {
    outline: 3px solid var(--b86-rt-heading);
    outline-offset: 2px;
}

.b86-rt .b86-rt__step-title:focus {
    outline: none;
}

.b86-rt .b86-rt__step-title:focus-visible {
    outline: 3px solid var(--b86-rt-heading);
    outline-offset: 4px;
}

/* Result. */

.b86-rt .b86-rt__result {
    margin: 0 0 var(--b86-rt-gap);
}

.b86-rt .b86-rt__result-sentence {
    margin: 0 0 0.75rem;
    padding: 1.25rem 1.5rem;
    border-inline-start: 4px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-heading);
    color: var(--b86-rt-surface);
    font-family: var(--b86-rt-font-heading);
    font-size: 1.2em;
    line-height: 1.4;
}

.b86-rt .b86-rt__result-sentence strong {
    color: var(--b86-rt-accent);
    font-weight: 700;
}

.b86-rt .b86-rt__result-per-child,
.b86-rt .b86-rt__assumption {
    margin: 0 0 0.5rem;
}

.b86-rt .b86-rt__assumption {
    font-size: 0.8em;
}

.b86-rt .b86-rt__warnings {
    margin: var(--b86-rt-gap) 0;
    padding: 0.75rem 1rem;
    border-inline-start: 2px solid var(--b86-rt-heading);
    background-color: var(--b86-rt-tint);
}

.b86-rt .b86-rt__warnings-title,
.b86-rt .b86-rt__report-title {
    margin: 0 0 0.5rem;
    color: var(--b86-rt-heading);
    font-family: var(--b86-rt-font-heading);
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
}

.b86-rt .b86-rt__warnings-list {
    margin: 0;
    padding-inline-start: 1.25rem;
    font-size: 0.9em;
}

/* The source and the disclaimer, under the report request. */
.b86-rt .b86-rt__result-notes {
    margin: var(--b86-rt-gap) 0 0;
}

.b86-rt .b86-rt__source,
.b86-rt .b86-rt__disclaimer {
    margin: 0 0 0.5rem;
    font-size: 0.75em;
    line-height: 1.45;
}

/* Report request and contact. */

.b86-rt .b86-rt__report {
    margin: calc(var(--b86-rt-gap) * 1.5) 0 0;
    padding: 1.25rem;
    border: 1px solid var(--b86-rt-line-accent);
}

.b86-rt .b86-rt__report-intro {
    margin: 0 0 var(--b86-rt-gap);
    font-size: 0.9em;
}

/* What the report holds: a list with a check mark in the accent colour, drawn with two borders. */
.b86-rt .b86-rt__report-contents {
    margin: 0 0 var(--b86-rt-group-gap);
    font-size: 0.9em;
}

.b86-rt .b86-rt__report-contents-title {
    margin: 0 0 0.5rem;
    color: var(--b86-rt-heading);
    font-weight: 600;
}

.b86-rt .b86-rt__report-contents-list {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.b86-rt .b86-rt__report-contents-list li {
    position: relative;
    margin: 0;
    padding-inline-start: 1.6rem;
}

.b86-rt .b86-rt__report-contents-list li::before {
    content: "";
    position: absolute;
    top: 0.2em;
    inset-inline-start: 0.4rem;
    width: 0.35rem;
    height: 0.7rem;
    border: solid var(--b86-rt-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* The optional wish to be contacted sits close under the consent it belongs with. */
.b86-rt .b86-rt__field--consent:has(+ .b86-rt__field--contact) {
    margin-bottom: var(--b86-rt-input-gap);
}

.b86-rt .b86-rt__nav--report {
    margin: 0;
    padding: 0;
    border-top: 0;
}

.b86-rt .b86-rt__report-reassurance {
    margin: 0;
    font-size: 0.8em;
}

.b86-rt .b86-rt__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin: calc(var(--b86-rt-gap) * 1.5) 0 0;
    padding: 1rem 1.25rem;
    border-inline-start: 1px solid var(--b86-rt-accent);
    background-color: var(--b86-rt-tint);
}

.b86-rt .b86-rt__contact-text {
    flex: 1 1 16rem;
    margin: 0;
    font-size: 0.9em;
}

.b86-rt .b86-rt__contact-link.elementor-button {
    flex: 0 1 auto;
}

/* The honeypot: out of sight for people, still in the form for bots. */

.b86-rt .b86-rt__hp {
    position: absolute;
    top: auto;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* In the Elementor editor the widget is inert: show the first step only. */

.b86-rt[data-b86-inert] .b86-rt__step:not([data-b86-step="1"]) {
    display: none;
}

@keyframes b86-rt-step-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes b86-rt-error-in {
    from {
        opacity: 0;
        transform: translateY(-0.25rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Two options per row; a last option on its own spans the row. */
@container b86-rt (min-width: 30rem) {
    .b86-rt .b86-rt__options--radio,
    .b86-rt .b86-rt__options--checkboxes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .b86-rt .b86-rt__options--radio > .b86-rt__option:last-child:nth-child(odd),
    .b86-rt .b86-rt__options--checkboxes > .b86-rt__option:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .b86-rt .b86-rt__nav .b86-rt__button.elementor-button {
        flex: 0 1 auto;
    }
}

/* A table for the groeipakket, the report form in two columns. */
@container b86-rt (min-width: 40rem) {
    .b86-rt .b86-rt__grid-head,
    .b86-rt .b86-rt__grid-row {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: var(--b86-rt-input-gap);
    }

    .b86-rt .b86-rt__grid-head {
        margin: 0 0 0.4rem;
        padding: 0 var(--b86-rt-input-gap);
        color: var(--b86-rt-heading);
        font-weight: 600;
        font-size: 0.8em;
    }

    .b86-rt .b86-rt__grid-row-label {
        grid-column: auto;
    }

    .b86-rt .b86-rt__grid-row .b86-rt__label-row {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .b86-rt .b86-rt__report-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--b86-rt-input-gap);
    }

    .b86-rt .b86-rt__report-intro,
    .b86-rt .b86-rt__report-contents,
    .b86-rt .b86-rt__field--consent,
    .b86-rt .b86-rt__field--contact,
    .b86-rt .b86-rt__nav--report {
        grid-column: 1 / -1;
    }
}

/* Three checkboxes per row; the last row fills up. */
@container b86-rt (min-width: 44rem) {
    .b86-rt .b86-rt__options--checkboxes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .b86-rt .b86-rt__options--checkboxes > .b86-rt__option:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .b86-rt .b86-rt__options--checkboxes > .b86-rt__option:last-child:nth-child(3n+1) {
        grid-column: 1 / -1;
    }

    .b86-rt .b86-rt__options--checkboxes > .b86-rt__option:last-child:nth-child(3n+2) {
        grid-column: span 2;
    }
}

@media (min-width: 768px) {
    .b86-rt {
        scroll-margin-top: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .b86-rt *,
    .b86-rt *::before,
    .b86-rt *::after {
        transition: none;
        animation: none;
    }

    .b86-rt .b86-rt__step,
    .b86-rt .b86-rt__error,
    .b86-rt .b86-rt__summary,
    .b86-rt .b86-rt__bar-fill,
    .b86-rt .b86-rt__options--radio > .b86-rt__option,
    .b86-rt .b86-rt__options--checkboxes > .b86-rt__option,
    .b86-rt .b86-rt__options--choice-tiles .b86-rt__option-label,
    .b86-rt button.b86-rt__button--secondary,
    .b86-rt button.b86-rt__button--secondary:hover,
    .b86-rt button.b86-rt__button--secondary:focus {
        transition: none;
        animation: none;
    }
}

/*
 * Last on purpose: anything the script hides stays hidden, also where a rule above sets a display
 * (the rows of the grid, the report form). The attribute is repeated to outrank
 * those rules.
 */
.b86-rt [hidden][hidden] {
    display: none;
}
