@charset "UTF-8";
/* Open Sans, latin subset, variable weight; licence in fonts/OFL.txt */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("/assets/fonts/open-sans-latin.woff2") format("woff2");
}

/* Colours follow the Baebeca house style of www.baebeca.de */
:root {
    --color-bg: #f6f5f3;
    --color-surface: #ffffff;
    --color-heading: #1b1e23;
    --color-text: #454b53;
    --color-muted: #6b717a;
    --color-border: #e7e5e2;
    --color-input-border: #cfd3d8;
    --color-primary: #b92121;
    --color-primary-dark: #8f1616;
    --color-primary-soft: #f6e3e3;
    --color-primary-text: #ffffff;
    --color-error: #b3261e;
    --color-error-bg: #fdecea;
    --color-success: #1f7a48;
    --color-success-bg: #e7f4ea;
    --color-warn: #7a5200;
    --color-warn-bg: #fff4d6;
    --color-warn-strong: #f2b705;
    --color-warn-strong-text: #3b2800;
    --color-test: #f28c28;
    --color-test-text: #2b1600;
    --color-info-bg: #faf6f4;
    --color-footer-bg: #17191d;
    --color-footer-text: #cfd3d9;
    --color-footer-line: #2e3238;
    --radius: 10px;
    --radius-control: 6px;
    --page-width: 130rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    font-family: "Open Sans", "Segoe UI", system-ui, sans-serif;
    color-scheme: light;
}

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

/* utility: the hidden attribute wins over every display rule of the sheet */
[hidden] {
    display: none !important;
}

html {
    font-size: 87.5%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

.site-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border-bottom: 3px solid var(--color-primary);
}

/* the top bar of the signed-in area: search, company switch and account menu */
.header-tools {
    flex: 1;
    min-width: 0;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.global-search {
    position: relative;
    flex: 0 1 28rem;
    margin-right: auto;
}

.global-search input {
    width: 100%;
    border-radius: 999px;
}

.global-search-results {
    position: absolute;
    top: calc(100% + var(--space-1));
    left: 0;
    z-index: 25;
    width: 100%;
    min-width: 18rem;
    max-height: 24rem;
    margin: 0;
    padding: var(--space-1) 0;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
    list-style: none;
}

.global-search-results .search-hit {
    display: grid;
    width: 100%;
    min-height: 44px;
    padding: var(--space-1) var(--space-3);
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.global-search-results small,
.search-empty {
    color: var(--color-muted);
}

.search-empty {
    padding: var(--space-2) var(--space-3);
}

.global-search-results .search-hit:hover,
.global-search-results .search-hit:focus-visible {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    text-decoration: none;
    color: var(--color-heading);
}

.brand img {
    display: block;
    width: 170px;
    height: auto;
}

.brand span {
    padding-left: var(--space-3);
    border-left: 1px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.brand:hover {
    color: var(--color-heading);
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: var(--space-4) var(--space-3);
}

/* a page shows with its content; the footer carries the termination and withdrawal buttons, so it shows after 3 seconds at the latest */
:not(:defined),
kp-guest[loading],
body:has(kp-app:empty, kp-guest[loading]) .site-footer {
    visibility: hidden;
    animation: reveal 0s 3s forwards;
}

@keyframes reveal {
    to {
        visibility: visible;
    }
}

.site-footer {
    padding: var(--space-4) var(--space-3) var(--space-3);
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    font-size: 0.9rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: var(--space-3) var(--space-5);
    max-width: var(--page-width);
    margin: 0 auto;
}

.footer-heading {
    margin: 0 0 var(--space-2);
    padding-bottom: var(--space-1);
    border-bottom: 2px solid var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary-text);
}

.site-footer address {
    font-style: normal;
    line-height: 1.6;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--color-footer-text);
}

.site-footer a:hover {
    color: var(--color-primary-text);
}

.site-footer li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

@media (pointer: fine) {
    .site-footer li a {
        min-height: 0;
        padding: 0.15rem 0;
    }
}

@media (max-width: 40rem) {
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-3);
    }

    .footer-inner > :first-child {
        grid-column: 1 / -1;
    }
}

.site-footer li a.footer-contract-link {
    font-weight: 700;
    color: var(--color-primary-text);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
    max-width: var(--page-width);
    margin: var(--space-3) auto 0;
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-footer-line);
    font-size: 0.8rem;
}

.footer-bottom p {
    margin: 0;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.narrow {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

/* beside the navigation every page uses the width of the content area */
.layout-main .narrow,
.layout-main .medium {
    max-width: none;
    margin: 0 0 var(--space-4);
}

.medium {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

h1,
h2,
h3 {
    color: var(--color-heading);
    line-height: 1.25;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0;
}

h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 var(--space-3);
}

legend {
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: var(--space-2);
}

label {
    display: block;
    margin-bottom: var(--space-3);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-heading);
}

input,
select,
textarea {
    display: block;
    width: 100%;
    min-height: 38px;
    margin-top: var(--space-1);
    padding: 0.35rem 0.7rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-heading);
    background: var(--color-surface);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-control);
}

textarea {
    resize: vertical;
}

input:disabled {
    color: var(--color-muted);
    background: var(--color-bg);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-heading);
    outline-offset: 2px;
}

html {
    scroll-padding-top: 4.5rem;
}

/* a link into a new tab and a button opening one carry the usual icon; the alt text after the slash tells assistive technology */
a[target="_blank"]::after,
.opens-tab::after {
    content: "";
    content: "" / "(öffnet in neuem Tab)";
    display: inline-block;
    flex: none;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.3em;
    vertical-align: -0.05em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.is-busy {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.is-busy::after {
    content: '';
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: var(--space-2);
    vertical-align: -0.1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: busy-spin 0.8s linear infinite;
}

@keyframes busy-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-busy::after {
        animation: none;
        border-right-color: currentColor;
        opacity: 0.6;
    }
}

.skip-link {
    position: absolute;
    left: var(--space-3);
    top: -10rem;
    z-index: 100;
    padding: var(--space-2) var(--space-3);
    color: var(--color-surface);
    background: var(--color-heading);
}

/* a heading the script focuses so no choice starts selected needs no visible frame */
#type-dialog-title:focus {
    outline: none;
}

.skip-link:focus {
    top: var(--space-2);
}

button:focus-visible,
a:focus-visible,
.check input:focus-visible {
    outline: 2px solid var(--color-heading);
    outline-offset: 2px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--color-error);
}

.check {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    font-weight: 400;
    color: var(--color-text);
}

.check input {
    width: 1.25rem;
    min-height: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
    flex: none;
    accent-color: var(--color-primary);
    box-shadow: none;
}

.check + .field-error {
    margin: calc(-1 * var(--space-2)) 0 var(--space-3) calc(1.25rem + var(--space-2));
}

.row {
    display: flex;
    gap: var(--space-3);
}

.inline-form {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    max-width: 36rem;
}

.inline-form > label {
    flex: 1;
}

.phone-form {
    display: flex;
    gap: var(--space-1);
}

.phone-form input {
    width: 11rem;
}

.request-state {
    margin: 0 0 var(--space-1);
}

.request-state-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.request-state-form select,
.request-state-form input {
    width: auto;
    margin-top: 0;
}

.unit-form {
    display: flex;
    align-items: flex-end;
    gap: var(--space-1);
}

.unit-form label {
    margin: 0;
    font-size: 0.8rem;
}

.inline-form > button {
    margin-top: calc(0.9rem * 1.6 + var(--space-1));
}

.row > label {
    flex: 1;
}

.row > .zip {
    flex: 0 0 8rem;
}

.row > .country {
    flex: 0 0 12rem;
}

.row > .phone {
    flex: 0 0 14rem;
}

.card > form,
.card details > form {
    max-width: 52rem;
}

.card > form.legal-form {
    max-width: 75%;
}

@media (max-width: 52rem) {
    .card > form.legal-form {
        max-width: none;
    }
}

/* Tom Select in the portal style */
.ts-wrapper {
    margin-top: var(--space-1);
}

.ts-wrapper .ts-control {
    min-height: 38px;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-control);
    font-size: 0.95rem;
    color: var(--color-heading);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.ts-control input {
    display: inline-block;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.ts-wrapper.multi .ts-control > .item {
    border-radius: var(--radius-control);
    background: var(--color-primary-soft);
    color: var(--color-heading);
}

.ts-wrapper.plugin-remove_button .item .remove {
    border-left-color: var(--color-border);
    color: var(--color-primary);
}

.ts-dropdown {
    border-color: var(--color-input-border);
    border-radius: 0 0 var(--radius-control) var(--radius-control);
    font-size: 0.95rem;
}

.ts-dropdown .active {
    background: var(--color-primary-soft);
    color: var(--color-heading);
}

.legal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2) var(--space-3);
    margin: 0 0 var(--space-1);
}

.legal-page h1 {
    margin: 0;
    color: var(--color-heading);
}

.legal-meta {
    margin: 0 0 var(--space-4);
    color: var(--color-muted);
}

.legal-text {
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.legal-text h2 {
    margin: var(--space-5) 0 var(--space-2);
    font-size: 1.25rem;
}

.legal-text h3,
.legal-text h4 {
    margin: var(--space-4) 0 var(--space-2);
    font-size: 1.05rem;
}

.legal-document + .legal-document {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.legal-document h3 {
    margin: 0;
}

@media print {
    .legal-page {
        border: 0;
        padding: 0;
    }
}

.legal-frame {
    display: block;
    width: 100%;
    height: 70vh;
    min-height: 24rem;
    margin: 0 0 var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.legal-embed {
    background: var(--color-surface);
}

.legal-embed main {
    padding: var(--space-3);
}

.avv-sign > label:not(.check) {
    max-width: 36rem;
}

.avv-note {
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-weight: 600;
}

@media print {
    .site-header,
    .site-footer,
    .nav-panel,
    .side-nav,
    .staff-banner,
    .no-print {
        display: none;
    }

    .layout {
        display: block;
    }

    .avv-print {
        max-height: none;
        overflow: visible;
    }
}

.request-form {
    max-width: 52rem;
    margin-top: var(--space-4);
}

.request-form fieldset {
    margin: 0 0 var(--space-4);
}

.request-form .field {
    margin-bottom: var(--space-4);
}

.request-form .field label {
    margin-bottom: 0;
}

.request-form .field .hint,
.request-form .field .field-error {
    margin: var(--space-1) 0 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.form-actions form {
    margin: 0;
}

.hp {
    display: none;
}

.facts.compact {
    margin: 0;
    font-size: 0.85rem;
}

.service-notice {
    margin-bottom: var(--space-4);
}

.service-notice h2 {
    margin: 0 0 var(--space-2);
    font-size: 1.1rem;
}

.pre-line {
    white-space: pre-line;
}

.field-label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 600;
}

.notice-pickers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.cancelled-list {
    margin: 0 0 var(--space-3);
    padding-left: var(--space-4);
}

.cancelled-list li + li {
    margin-top: var(--space-1);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-3);
}

.tiles-group {
    display: contents;
}

/* at most four per row; below that the minimum width wraps to three, two and one */
.tiles-tasks {
    grid-template-columns: repeat(auto-fit, minmax(max(16rem, calc((100% - 3 * var(--space-3)) / 4)), 1fr));
}

.tiles-row + .tiles-row {
    margin-top: var(--space-4);
}

.tiles-heading {
    margin: 0 0 var(--space-2);
}

.tiles-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}

.tiles-wide .tile {
    padding: var(--space-4);
}

.marketing-box {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.marketing-intro {
    max-width: 52rem;
    margin: 0 0 var(--space-4);
    font-size: 1.1rem;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.benefit {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: var(--space-3);
    grid-template-rows: auto 1fr;
    align-items: start;
}

.benefit-icon {
    grid-row: span 2;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.45rem;
    border-radius: var(--radius-control);
    background: var(--color-primary-soft);
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.benefit strong {
    color: var(--color-heading);
}

.benefit-compact {
    gap: var(--space-3);
    font-size: 0.95rem;
}

.addon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.addon-tags li {
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.9rem;
}

.marketing-editor {
    margin: 0 0 var(--space-3) var(--space-4);
}

.marketing-editor summary {
    cursor: pointer;
    color: var(--color-muted);
}

.tile-price {
    margin-top: auto;
    padding-top: var(--space-2);
    font-weight: 600;
    color: var(--color-heading);
}

@media (max-width: 64rem) {
    .tiles-wide,
    .benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 40rem) {
    .tiles-wide,
    .benefit-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    color: var(--color-text);
    text-decoration: none;
}

.tile:hover,
.tile:focus-visible {
    border-color: var(--color-primary);
}

.tile strong {
    font-size: 1.3rem;
    color: var(--color-heading);
}

.tiles-target {
    grid-template-columns: repeat(auto-fill, minmax(max(16rem, calc((100% - var(--space-3)) / 2)), 1fr));
}

.target-tile .meter {
    margin: var(--space-2) 0 0;
}

.task-tile.warn {
    border-left: 4px solid var(--color-warn-strong);
}

.task-tile.error {
    border-left: 4px solid var(--color-error);
}

.avatar {
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-border);
}

.toolbar-avatar {
    width: 32px;
    height: 32px;
}

.user-menu {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: 0 var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    color: var(--color-heading);
    font: inherit;
}

.user-menu-button::after {
    content: "";
    width: 0.4em;
    height: 0.4em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15em) rotate(45deg);
}

.user-menu .user-menu-button:hover,
.user-menu .user-menu-button[aria-expanded="true"] {
    border-color: var(--color-border);
    color: var(--color-heading);
    background: var(--color-surface);
}

.user-menu-list {
    position: absolute;
    top: calc(100% + var(--space-1));
    right: 0;
    z-index: 20;
    min-width: 15rem;
    margin: 0;
    padding: var(--space-1) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
    list-style: none;
}

.user-menu-list a,
.user-menu-list button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 var(--space-3);
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-menu .user-menu-list a:hover,
.user-menu .user-menu-list a:focus-visible,
.user-menu .user-menu-list button:hover,
.user-menu .user-menu-list button:focus-visible {
    color: var(--color-heading);
    background: rgb(27 30 35 / 5%);
}

.avatar-large {
    width: 8rem;
    height: 8rem;
}

.user-name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.user-name .avatar {
    width: 32px;
    height: 32px;
}

.avatar-edit,
.avatar-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.avatar-edit p:first-child,
.avatar-warning h2 {
    margin-top: 0;
}

.avatar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-2);
}

.avatar-actions label:focus-within {
    outline: 2px solid var(--color-heading);
    outline-offset: 2px;
}

/* the staff dashboard's call for a profile picture stands out above every other card */
.avatar-warning {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    border: 3px solid var(--color-warn-strong);
    border-radius: var(--radius);
    color: var(--color-warn-strong-text);
    background: var(--color-warn-bg);
}

.avatar-warning h2 {
    font-size: 1.6rem;
    color: var(--color-warn-strong-text);
}

.todo-tile {
    border-left: 4px solid var(--color-warn-strong);
}

@media (max-width: 40rem) {
    .avatar-edit,
    .avatar-warning {
        flex-direction: column;
    }
}

.tile[target="_blank"] {
    position: relative;
}

.tile[target="_blank"]::after {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    margin: 0;
}

.field-error {
    display: block;
    color: var(--color-error);
    font-size: 0.9rem;
    margin-top: var(--space-1);
}

button,
.button {
    display: inline-block;
    min-height: 38px;
    padding: 0.4rem 1.1rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary-text);
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-control);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* a button element centres its label by itself, a link or label in button style needs flex for that */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover:not(:disabled),
.button:hover {
    color: var(--color-primary-text);
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.security-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.security-actions li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
}

.security-actions h3 {
    margin: 0;
}

.security-actions p {
    flex: 1;
}

.job-steps .current {
    font-weight: 600;
    color: var(--color-heading);
}

.job-decisions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-3) 0;
}

button.secondary,
.button.secondary {
    color: var(--color-primary);
    background: transparent;
}

button.secondary:hover:not(:disabled),
.button.secondary:hover {
    color: var(--color-primary-text);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

button.danger,
button.danger:hover:not(:disabled) {
    color: var(--color-primary-text);
    background: var(--color-error);
    border-color: var(--color-error);
}

button.danger:hover:not(:disabled) {
    filter: brightness(0.9);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button[aria-busy="true"] {
    cursor: wait;
}

.notice {
    padding: var(--space-2) var(--space-3);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-control);
    background: var(--color-info-bg);
}

.notice.error {
    border-left-color: var(--color-error);
}

.notice.success {
    border-left-color: var(--color-success);
}

.notice.error {
    color: var(--color-error);
    background: var(--color-error-bg);
}

.notice.success {
    color: var(--color-success);
    background: var(--color-success-bg);
}

.notice.warn {
    border-left-color: var(--color-warn);
    color: var(--color-warn);
    background: var(--color-warn-bg);
}

.hint {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.mono {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-1) var(--space-3);
}

.facts dt {
    color: var(--color-muted);
}

.facts dd {
    margin: 0;
}

.mandate-text {
    font-size: 0.9rem;
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.toolbar-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--color-heading);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
}

.filter-bar label {
    margin-bottom: 0;
}

.filter-bar label:first-child {
    flex: 1 1 16rem;
    max-width: 28rem;
}

.filter-bar .check {
    align-self: flex-end;
    min-height: 38px;
    align-items: center;
}

.filter-bar .check input {
    margin: 0;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

/* a create button and the form it opens above its table */
.create-toolbar,
.create-panel {
    margin-bottom: var(--space-3);
}

.create-panel {
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
}

.create-panel h3 {
    margin-top: 0;
}

.dialog {
    width: min(36rem, calc(100vw - 2rem));
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

.dialog::backdrop {
    background: rgba(23, 25, 29, 0.45);
}

.dialog h2 {
    margin-top: 0;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.take-over {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
}

.take-over summary {
    cursor: pointer;
    font-weight: 600;
}

.cell-note {
    display: block;
    color: var(--color-muted);
}

td > button {
    margin: 0 var(--space-2) var(--space-1) 0;
}

.meter {
    width: 100%;
    height: 10px;
    margin-bottom: var(--space-3);
    accent-color: var(--color-primary);
}

.separator {
    margin: var(--space-4) 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.addon-parents {
    margin-bottom: var(--space-2);
}

.field-title.addon-parents-main {
    font-size: 1rem;
}

.field-title.addon-parents-extra {
    margin-top: var(--space-3);
    font-weight: 400;
}

.category-tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-tree .category-tree {
    padding-left: var(--space-4);
    border-left: 2px solid var(--color-border);
}

.category-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) minmax(14rem, 2fr) auto auto;
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-2) 0;
}

.category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

@media (max-width: 40rem) {
    .category-row {
        grid-template-columns: 1fr;
    }
}


td > input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    min-height: 1.1rem;
    margin: 0;
    padding: 0;
    accent-color: var(--color-primary);
}

.field-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-heading);
}

.icon-button {
    min-height: 0;
    padding: 0 var(--space-2);
    border: 0;
    background: transparent;
    color: var(--color-primary);
    line-height: 1.6;
}

.icon-button {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.8rem;
}

.row-toggles {
    white-space: nowrap;
}

.icon-button.addon-toggle {
    font-family: inherit;
    font-size: 0.95rem;
}

.icon-button.addon-toggle.empty {
    visibility: hidden;
}

.linked-addons {
    margin: 0 0 var(--space-2);
    padding-left: var(--space-4);
}

.customer-switch {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.customer-switch .ts-wrapper {
    min-width: 16rem;
    margin-top: 0;
}

.customer-switch .ts-wrapper .ts-control {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.3rem 0.8rem;
    background: var(--color-surface);
    /* Tom Select sets the right padding from this minimum, it keeps the arrow free */
    --ts-pr-min: 2.2rem;
}

.customer-switch .ts-wrapper .ts-control::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.9rem;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--color-muted);
    border-bottom: 2px solid var(--color-muted);
    transform: translateY(-70%) rotate(45deg);
}

/* Tom Select sets its own class on the rendered company entry, so the rule names the item */
.customer-switch .ts-control > .item {
    display: grid;
    line-height: 1.25;
}

/* a single company stays shown as the company the user acts for, without choice */
.customer-switch .ts-wrapper.disabled .ts-control {
    opacity: 1;
    --ts-pr-min: 0.8rem;
    background: var(--color-surface);
    cursor: default;
}

.customer-switch .ts-wrapper.disabled .ts-control::after {
    display: none;
}

.company-entry {
    display: grid;
    line-height: 1.25;
}

.company-entry strong {
    color: var(--color-heading);
    font-weight: 700;
}

.company-entry small {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.staff-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-control);
    background: var(--color-primary-soft);
    color: var(--color-heading);
    font-weight: 600;
}

.staff-banner[hidden] {
    display: none;
}

.layout {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: var(--space-4);
    align-items: start;
}

.side-nav {
    display: grid;
    gap: 2px;
    padding: var(--space-2) 0.75rem;
    border-radius: var(--radius);
    background: rgb(27 30 35 / 3%);
}

summary {
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: "";
    display: inline-block;
    flex: none;
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.6em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.1em) rotate(-45deg);
    transition: transform 0.2s;
}

details[open] > summary::before {
    transform: translateY(-0.2em) rotate(45deg);
}

.nav-group-title,
.nav-top a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: var(--radius-control);
    background: none;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    color: var(--color-heading);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nav-group-title::after {
    content: "";
    flex: none;
    width: 0.45em;
    height: 0.45em;
    margin-right: var(--space-1);
    margin-left: auto;
    border-right: 2px solid var(--color-muted);
    border-bottom: 2px solid var(--color-muted);
    transform: rotate(-45deg);
    transition: transform 0.2s;
}

.nav-group-title[aria-expanded="true"]::after {
    transform: translateY(-0.15em) rotate(45deg);
}

.side-nav .nav-group-title:hover,
.side-nav .nav-group-title:focus-visible,
.nav-top a:hover,
.nav-top a:focus-visible {
    border-color: transparent;
    color: var(--color-heading);
    background: rgb(27 30 35 / 5%);
}

.nav-icon {
    flex: none;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--color-muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-count {
    font-weight: 400;
}

/* a grid item grows to the width of its content, a long title with counts would push the entries past the padding of the navigation */
.side-nav > *,
.nav-group > ul > li {
    min-width: 0;
}

.nav-group-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group-title .nav-count,
.nav-group-title .nav-badge {
    flex: none;
}

.nav-group > ul {
    display: grid;
    gap: 1px;
    list-style: none;
    margin: 0 0 var(--space-2) 2.15rem;
    padding: 0 0 0 var(--space-2);
    border-left: 2px solid var(--color-border);
}

.nav-group > ul[hidden] {
    display: none;
}

.nav-top > ul {
    margin: 0;
    padding: 0;
    border-left: 0;
}

.nav-subgroup ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-branch > ul {
    display: grid;
    gap: 1px;
    list-style: none;
    margin: 1px 0 var(--space-1) 0.9rem;
    padding: 0 0 0 var(--space-2);
    border-left: 2px solid var(--color-border);
}

.nav-branch > ul[hidden] {
    display: none;
}

.nav-group:not(.nav-top) a,
.nav-group .nav-action {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0.3rem 0.6rem;
    border: 0;
    border-radius: var(--radius-control);
    background: none;
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nav-group .nav-action:hover,
.nav-group .nav-action:focus-visible,
.nav-group:not(.nav-top) a:hover,
.nav-group:not(.nav-top) a:focus-visible {
    color: var(--color-primary);
    background: var(--color-surface);
}

.nav-group a[aria-current="page"] {
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    margin-left: var(--space-2);
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.nav-badge.warn {
    background: var(--color-warn-strong);
    color: var(--color-warn-strong-text);
}

.nav-badge.error {
    background: var(--color-error);
    color: #ffffff;
}

.nav-group .nav-subgroup-title {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 0.6rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.nav-group .nav-subgroup a {
    padding-left: 1.2rem;
}

pre {
    overflow-x: auto;
    padding: var(--space-2);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--color-bg);
    border-radius: var(--radius-control);
}

table {
    position: relative;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-3);
}

.group-row th {
    padding-top: var(--space-3);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-heading);
    border-bottom: 2px solid var(--color-primary);
}

.raw-row td {
    padding-top: 0;
}

tr:has(+ .raw-row) td {
    border-bottom: 0;
}

td > button + button {
    margin-left: var(--space-2);
}

th,
td {
    text-align: left;
    padding: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

tbody tr:nth-child(even) > * {
    background: var(--color-bg);
}

tbody:has(> .raw-row) > tr:nth-child(even) > * {
    background: none;
}

tbody:has(> .raw-row) > tr:nth-child(4n+3) > *,
tbody:has(> .raw-row) > tr:nth-child(4n+4) > * {
    background: var(--color-bg);
}

/* a grouped body stripes per group with the class is-alt its renderer sets after sorting */
tbody.grouped > tr > * {
    background: none;
}

tbody.grouped > tr.is-alt > * {
    background: var(--color-bg);
}

thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--color-surface);
    box-shadow: inset 0 -1px 0 var(--color-border);
}

.steps li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    margin-bottom: var(--space-2);
    color: var(--color-muted);
}

.steps li::before {
    content: counter(list-item);
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--color-input-border);
    border-radius: 50%;
    background: var(--color-surface);
    font-weight: 700;
    color: var(--color-muted);
}

.steps li[data-state] {
    color: var(--color-heading);
}

.steps li[data-state="running"]::before {
    content: "";
    border-color: var(--color-primary-soft);
    border-top-color: var(--color-primary);
    animation: spin 0.9s linear infinite;
}

.steps li[data-state="done"]::before {
    content: "✓";
    border-color: var(--color-success);
    background: var(--color-success);
    color: var(--color-primary-text);
}

.steps li[data-state="failed"]::before {
    content: "!";
    border-color: var(--color-error);
    background: var(--color-error);
    color: var(--color-primary-text);
}

.dropzone {
    margin: 0 0 var(--space-3);
    padding: var(--space-3);
    text-align: center;
    border: 2px dashed var(--color-input-border);
    border-radius: var(--radius-control);
    transition: background-color 0.2s, border-color 0.2s;
}

.dropzone legend {
    padding: 0 var(--space-1);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-heading);
}

.dropzone p {
    margin: 0 0 var(--space-2);
}

.dropzone.is-dragover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
}

.dropzone label.button {
    min-height: 44px;
    margin: 0;
    color: var(--color-primary);
    background: transparent;
}

.dropzone label.button:hover {
    color: var(--color-primary-text);
    background: var(--color-primary);
}

.dropzone label.button:focus-within {
    outline: 2px solid var(--color-heading);
    outline-offset: 2px;
}

.file-list {
    margin: 0 0 var(--space-2);
    padding: 0;
    list-style: none;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--color-border);
}

.file-list .file-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.file-list button {
    min-height: 44px;
}

.hint.is-error {
    color: var(--color-error);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (pointer: coarse) {
    input,
    select,
    button,
    .button,
    .nav-group a,
    .check {
        min-height: 44px;
    }

    .hint a,
    .login-register a {
        display: inline-block;
        padding-block: 0.6rem;
    }
}

.type-switch {
    display: inline-flex;
}

.type-switch > button {
    border-radius: 0;
}

.type-switch > button:first-child {
    border-radius: var(--radius-control) 0 0 var(--radius-control);
}

.type-switch > button:last-child {
    margin-left: -1px;
    border-radius: 0 var(--radius-control) var(--radius-control) 0;
}

.type-switch > button[aria-pressed="true"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.guest-order {
    display: grid;
    gap: var(--space-2);
}

.guest-order p {
    margin: 0;
}

.nav-toggle,
.nav-panel-head,
.nav-panel-foot,
.nav-overlay {
    display: none;
}

@media (max-width: 52rem) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 30;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: var(--space-2);
        padding: var(--space-1) var(--space-3);
    }

    .header-tools {
        order: 3;
        flex-basis: 100%;
    }

    .global-search {
        flex-basis: 100%;
    }

    .has-nav .nav-toggle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 1px solid var(--color-border);
        background: var(--color-surface);
    }

    .nav-toggle-bars,
    .nav-toggle-bars::before,
    .nav-toggle-bars::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--color-heading);
    }

    .nav-toggle-bars {
        position: relative;
    }

    .nav-toggle-bars::before,
    .nav-toggle-bars::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .nav-toggle-bars::before {
        top: -6px;
    }

    .nav-toggle-bars::after {
        top: 6px;
    }

    .nav-panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        width: min(20rem, 85vw);
        overflow-y: auto;
        background: var(--color-surface);
        box-shadow: -4px 0 16px rgb(0 0 0 / 0.2);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.25s, visibility 0s 0.25s;
    }

    .nav-panel.open {
        transform: none;
        visibility: visible;
        transition: transform 0.25s;
    }

    .nav-panel-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
        border-bottom: 3px solid var(--color-primary);
        font-weight: 700;
        color: var(--color-heading);
    }

    .nav-close {
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-heading);
        font-size: 1.8rem;
        line-height: 1;
    }

    .nav-panel .side-nav {
        flex: 1 0 auto;
        border: 0;
        border-radius: 0;
    }

    .nav-panel-foot {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
        padding: var(--space-3);
        border-top: 1px solid var(--color-border);
        color: var(--color-muted);
    }

    .toolbar-user,
    .toolbar-logout {
        display: none;
    }

    .nav-panel .nav-group a {
        min-height: 44px;
    }

    /* the panel lies on the surface colour, so hover and the current entry take the page background */
    .nav-panel .nav-group a:hover,
    .nav-panel .nav-group a:focus-visible,
    .nav-panel .nav-group a[aria-current="page"] {
        background: var(--color-bg);
    }

    .nav-open {
        overflow: hidden;
    }

    .nav-open .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgb(0 0 0 / 0.4);
    }
}

@media (max-width: 52rem) and (prefers-reduced-motion: reduce) {
    .nav-panel,
    .nav-panel.open {
        transition: none;
    }
}

@media (max-width: 40rem) {
    .row {
        flex-direction: column;
        gap: 0;
    }

    .row > .zip,
    .row > .country,
    .row > .phone {
        flex-basis: auto;
    }

    .brand img {
        width: 130px;
    }

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

    table {
        display: block;
        overflow-x: auto;
    }
}

.eyebrow {
    margin: 0 0 var(--space-1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.start-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.start-card {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.start-card .hint {
    flex: 1;
    margin-bottom: var(--space-4);
}

.button-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.confirm .steps {
    margin: var(--space-4) 0;
    padding: 0;
    list-style: none;
    counter-reset: list-item;
}

.confirm .steps li {
    counter-increment: list-item;
}

.progress-bar {
    position: relative;
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--color-primary-soft);
}

.progress-bar span {
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 3px;
    background: var(--color-primary);
    animation: progress-slide 1.4s ease-in-out infinite;
}

.confirm-done {
    padding: var(--space-4);
    border-radius: var(--radius);
    background: var(--color-success-bg);
}

.confirm-done h2 {
    color: var(--color-success);
}

@keyframes progress-slide {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(250%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.product-cards {
    display: grid;
    /* at most four cards per row, each at least 12rem wide */
    grid-template-columns: repeat(auto-fill, minmax(max(12rem, calc((100% - 3*var(--space-3))/4)), 1fr));
    gap: var(--space-3);
    margin: 0 0 var(--space-3);
    padding: 0;
    list-style: none;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
}

.product-card.staff-only {
    border-style: dashed;
    border-color: var(--color-warn);
    background: var(--color-warn-bg);
}

.product-staff-only {
    margin-bottom: var(--space-2);
}

.staff-box {
    border: 1px dashed var(--color-warn);
    border-radius: var(--radius-control);
    background: var(--color-warn-bg);
    padding: var(--space-2) var(--space-3);
}

.staff-box legend {
    padding: 0 var(--space-1);
    font-weight: 600;
}

.staff-box .hint {
    margin: var(--space-1) 0 0;
}

.product-card,
.product-description {
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-card h4 {
    margin: 0 0 var(--space-2);
    font-size: 1rem;
    color: var(--color-heading);
}

.product-card p,
.booking-head > p,
.contract-text {
    white-space: pre-line;
}

.product-card .product-price {
    margin-top: auto;
}

.individual-offers-heading {
    margin: 0 0 var(--space-2);
    color: var(--color-primary);
}

.individual-offers-rule {
    margin: var(--space-4) 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.individual-offer {
    margin: 0 0 var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

.product-price,
.booking-total {
    font-weight: 700;
    color: var(--color-heading);
}

.catalog-section + .catalog-section {
    margin-top: var(--space-4);
}

.product-description {
    max-width: 52rem;
    margin: 0 0 var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius);
    background: var(--color-bg);
}

/* the card is the query container of the two-column layout */
.booking {
    container: booking / inline-size;
}

.booking-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.booking-head {
    max-width: 52rem;
}

.booking-head .eyebrow {
    margin: 0 0 var(--space-1);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.booking-head h2 {
    margin: 0 0 var(--space-3);
    font-size: 1.5rem;
}

.booking-price {
    margin: 0 0 var(--space-1);
    font-size: 1.25rem;
}

.booking-head > .hint {
    margin: 0;
}

.booking-form {
    display: grid;
    gap: var(--space-4);
    max-width: 52rem;
}

.booking-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    counter-reset: booking-step;
}

/* hidden steps take no number: display none skips counter-increment */
.booking-step {
    min-width: 0;
    margin: 0;
    padding: var(--space-3) var(--space-4) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    counter-increment: booking-step;
}

/* the float pulls the legend inside the fieldset border */
.booking-step > legend {
    float: left;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin: 0 0 var(--space-3);
    padding: 0;
    font-size: 1.05rem;
}

.booking-step > legend::before {
    content: counter(booking-step) / "";
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.booking-step > legend + * {
    clear: left;
}

.booking-step > :last-child {
    margin-bottom: 0;
}

.booking-step > .hint {
    margin-top: 0;
}

/* add-ons and periods as selectable tiles; booking.js renders them as label.check */
.booking-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: var(--space-2);
}

.booking-options + .hint {
    margin-top: var(--space-2);
}

.booking-options > .check {
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.booking-options > .check input {
    margin: 0;
}

.booking-options > .check:hover {
    border-color: var(--color-primary);
}

.booking-options > .check:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-heading);
}

/* kp-mandate renders a card of its own inside the payment step */
.booking-step kp-mandate > .card {
    margin: 0;
    padding: 0;
    border: 0;
}

.booking-aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-4);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-info-bg);
}

.booking-aside > *,
.booking-aside > div > :last-child {
    margin: 0;
}

.booking-summary h3 {
    margin: 0 0 var(--space-2);
}

.booking-lines {
    width: 100%;
    margin: 0 0 var(--space-3);
    font-variant-numeric: tabular-nums;
}

.booking-lines th,
.booking-lines td {
    padding: var(--space-1) 0;
    border-bottom: 0;
}

.booking-lines tbody tr > * {
    background: none;
}

.booking-lines thead th {
    position: static;
    background: none;
    box-shadow: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
}

.booking-lines .amount {
    padding-left: var(--space-3);
    text-align: right;
    white-space: nowrap;
}

.booking-lines tfoot th {
    font-weight: 400;
}

.booking-lines tfoot tr:first-child > * {
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

.booking-lines .booking-total > * {
    padding-top: var(--space-2);
    border-top: 2px solid var(--color-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.booking-lines .booking-discount > * {
    color: var(--color-success);
    font-weight: 600;
}

.addon-info .addon-hint {
    color: var(--color-text);
}

.booking-line-note {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.discount-badge {
    margin-left: var(--space-1);
    color: var(--color-success);
    font-weight: 700;
}

.booking-terms {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    font-size: 0.9rem;
}

.booking-terms dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
}

.booking-terms dd {
    margin: 0;
    color: var(--color-heading);
}

.booking-submit {
    width: 100%;
    min-height: 44px;
    font-size: 1.05rem;
}

.booking-next {
    width: 100%;
    min-height: 44px;
}

.booking-finish {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.booking-finish > * {
    margin: 0;
}

.booking-recap {
    padding: var(--space-3);
    font-weight: 600;
    color: var(--color-heading);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-info-bg);
}

/* on a phone the summary sits right above the finish, so the bar leads there and the button in the summary is not needed */
.booking-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface);
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
}

.booking-bar[hidden] {
    display: none;
}

.booking-bar-total {
    font-weight: 700;
    color: var(--color-heading);
}

.booking-bar button {
    min-height: 44px;
}

@container booking (max-width: 55.99rem) {
    .booking-next {
        display: none;
    }
}

@container booking (min-width: 56rem) {
    .booking-bar {
        display: none;
    }

    .booking-main {
        grid-column: 1;
        grid-row: 1;
    }

    .booking-finish {
        grid-column: 1;
        grid-row: 2;
    }

    .booking-aside {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

/* two columns once the card holds a 30rem form column beside the 24rem summary */
@container booking (min-width: 56rem) {
    .booking-form {
        grid-template-columns: minmax(0, 1fr) 24rem;
        align-items: start;
        gap: var(--space-5);
        max-width: 78rem;
    }
}

/* the summary scrolls along only where the viewport is tall enough to show it whole */
/* booking.js sets fits while the box is lower than the viewport; a taller box scrolls with the page */
@container booking (min-width: 56rem) {
    .booking-aside.fits {
        position: sticky;
        top: var(--space-4);
    }
}

@media (max-width: 40rem) {
    .booking-step,
    .booking-aside {
        padding: var(--space-3);
    }

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

    /* undoes the scrolling block table of the phone layout */
    .booking-lines {
        display: table;
        overflow: visible;
    }
}

.table-scroll {
    overflow-x: auto;
}

/* the address list shows in full length, only a narrow screen scrolls it sideways */
.ip-table {
    overflow-x: auto;
}

.ip-rows input {
    min-width: 9rem;
}

.ip-ping {
    display: block;
    white-space: nowrap;
}

.ip-ping::before {
    content: "\2717";
    margin-right: var(--space-1);
    font-weight: 700;
    color: var(--color-error);
}

.ip-ping.answers::before {
    content: "\2713";
    color: var(--color-success);
}

.ip-rows select {
    min-width: 11rem;
}

.ip-locked td {
    color: var(--color-muted);
}

.ip-conflict td {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.server-total {
    margin: var(--space-2) 0 0;
    font-weight: 600;
    color: var(--color-heading);
}

.included-domain {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.included-domain .notice,
.included-domain .hint {
    margin: 0;
}

.settings-section {
    margin: var(--space-3) 0 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.settings-section > legend {
    float: left;
    width: 100%;
    margin-bottom: var(--space-2);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-section > legend ~ * {
    clear: both;
}

.article-booking {
    align-items: center;
}

.article-booking > .check {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border);
}

.article-description {
    margin: var(--space-2) 0 0;
    white-space: pre-line;
    font-size: 0.9rem;
}

.link-button {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

.link-button:hover:not(:disabled) {
    background: none;
    color: var(--color-primary-dark);
}

.sort-button {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sort-button:hover:not(:disabled),
.sort-button:focus,
.sort-button:active {
    background: none;
    color: inherit;
    text-decoration: underline;
}

.sort-button::after {
    content: attr(data-direction);
    margin-left: var(--space-1);
    font-size: 0.75em;
}

.commission-preview {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.commission-preview h4 {
    margin-top: 0;
}

.forecast-toggle {
    color: var(--color-heading);
    text-align: left;
    text-decoration: none;
}

.forecast-toggle::before {
    content: "▸ ";
    color: var(--color-primary);
}

.forecast-toggle[aria-expanded="true"]::before {
    content: "▾ ";
}

kp-staff-registrar-handles .forecast-toggle {
    white-space: nowrap;
}

.forecast-customer td {
    font-weight: 600;
}

.forecast-contract td {
    font-size: 0.9rem;
}

.forecast-contract > td:first-child {
    padding-left: calc(var(--space-2) + 1.5rem);
}

.sum-row > * {
    font-weight: 600;
    border-top: 2px solid var(--color-heading);
    border-bottom: none;
}

.link-button.article-expand {
    display: inline-flex;
    gap: 0.3em;
    align-items: baseline;
    color: var(--color-heading);
    text-align: left;
    text-decoration: none;
}

.article-expand::before {
    content: "▸";
    color: var(--color-primary);
}

.article-expand[aria-expanded="true"]::before {
    content: "▾";
}

.sdn-box {
    margin-bottom: var(--space-3);
}

.check input:disabled,
.check input:disabled + span {
    cursor: not-allowed;
    color: var(--color-muted);
}

.sdn-box pre {
    clip-path: none;
    white-space: pre-wrap;
    word-break: break-all;
    user-select: all;
    background: var(--color-surface);
}

.booking-progress {
    padding: var(--space-4) 0;
    text-align: center;
}

.booking-progress h2 {
    max-width: 36rem;
    margin: var(--space-3) auto;
    font-size: 1.5rem;
}

.spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto var(--space-3);
    border: 4px solid var(--color-primary-soft);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.small {
    display: inline-block;
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: 0;
    border-width: 2px;
}


.contract-filters {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.contract-filters input[type="search"] {
    margin-bottom: var(--space-2);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.filter-label {
    min-width: 4.5rem;
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 44px;
    padding: 0 var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
}

.filter-chip[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
}

.filter-count {
    color: inherit;
}

.contract-table {
    width: 100%;
}

.contract-table .contract-group th {
    padding-top: var(--space-4);
    color: var(--color-heading);
    font-size: 1rem;
}

.contract-row {
    cursor: pointer;
}

.contract-row:hover {
    background: var(--color-primary-soft);
}

.contract-row .cell-note {
    display: block;
}

.contract-detail > td {
    padding: 0 0 var(--space-3);
    background: var(--color-bg);
}

.contract-detail .contract-card {
    margin: var(--space-2) 0 0;
}

.contract-card {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.contract-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
}

.contract-name {
    min-width: 0;
}

.contract-number {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.contract-name h4 {
    margin: 0 0 var(--space-2);
    font-size: 1.05rem;
    color: var(--color-heading);
    overflow-wrap: anywhere;
}

/* the title opens and closes the details of a contract or add-on, marked like a summary */
.contract-toggle,
.contract-toggle:hover:not(:disabled) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-align: left;
}

.contract-toggle::before {
    content: "";
    flex: none;
    align-self: center;
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.6em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s;
}

.contract-toggle[aria-expanded="true"]::before {
    transform: rotate(45deg);
}

.contract-text .notice {
    margin-top: var(--space-2);
}

.workflow-group {
    margin-top: var(--space-4);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
}

.workflow-group h3 {
    margin-top: 0;
}

.workflow-block {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.workflow-block summary {
    padding: var(--space-2) 0;
}

.run-dots {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.run-version,
.run-state {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.run-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--color-border);
    vertical-align: middle;
}

.run-dot.ok {
    background: var(--color-success);
}

.run-dot.failed {
    background: var(--color-error);
}

.run-dot.running {
    border: 2px solid var(--color-primary);
    border-right-color: transparent;
    background: none;
    animation: busy-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .run-dot.running {
        border-right-color: var(--color-primary);
        animation: none;
    }
}

.realtest > button {
    margin-bottom: var(--space-3);
}

.adopt-preview h3 {
    margin-top: var(--space-3);
}

.adopt-routing {
    margin-top: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

.adopt-routing p {
    margin: var(--space-1) 0;
}

.dialog:has(.adopt-preview) {
    width: min(52rem, calc(100vw - 2rem));
}

.adopt-routing td {
    overflow-wrap: anywhere;
}

.check-ok {
    color: var(--color-success);
}

.check-fail {
    color: var(--color-error);
    font-weight: 600;
}

.workflow-action {
    margin-left: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.workflow-writes td:nth-child(3) {
    font-weight: 600;
    color: var(--color-heading);
}

.api-key-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.api-key-list > li {
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border);
}

.api-key-list p {
    margin: var(--space-1) 0;
}

.contract-brief {
    display: block;
    margin-top: var(--space-1);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.action-menu-list .is-test {
    background: var(--color-test);
    color: var(--color-test-text);
    font-weight: 600;
}

.action-menu-list .is-disabled {
    color: var(--color-muted);
    cursor: not-allowed;
}

.action-menu-hint {
    display: block;
    font-size: 0.8rem;
}

.api-ref {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
}

.api-nav {
    position: sticky;
    top: var(--space-3);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    font-size: 0.9rem;
}

.api-nav h2 {
    margin: var(--space-3) 0 var(--space-1);
    font-size: 0.95rem;
}

.api-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.api-nav li a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) 0;
    text-decoration: none;
}

/* the method badge of an entry stays without underline, its title keeps the one of a link */
.api-nav-title {
    text-decoration: underline;
}

.api-endpoint {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.api-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.api-method {
    display: inline-block;
    min-width: 3.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-control);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--color-primary-text);
    background: var(--color-heading);
}

.api-get {
    background: var(--color-success);
}

.api-put {
    background: var(--color-warn);
}

.api-delete {
    background: var(--color-error);
}

.api-code {
    position: relative;
    padding-right: 6rem;
}

.api-copy {
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
}

/* every table of a kind takes the same column widths, so the columns stand alike from endpoint to endpoint */
.api-table {
    table-layout: fixed;
}

.api-table th,
.api-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.api-params th:nth-child(1),
.api-fields th:nth-child(1) {
    width: 26%;
}

.api-params th:nth-child(2),
.api-fields th:nth-child(2) {
    width: 14%;
}

.api-params th:nth-child(3) {
    width: 4.5rem;
}

.api-errors th:nth-child(1) {
    width: 6rem;
}

@media (max-width: 60rem) {
    .api-ref {
        grid-template-columns: 1fr;
    }

    .api-nav {
        position: static;
        max-height: none;
    }
}

/* a narrow screen shows each row as a block, every cell under the name of its column */
@media (max-width: 40rem) {
    .api-table,
    .api-table tbody,
    .api-table tr,
    .api-table td {
        display: block;
        width: 100%;
    }

    .api-table {
        overflow: visible;
    }

    .api-table thead {
        display: none;
    }

    .api-table tr {
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .api-table td {
        padding: var(--space-1) 0;
        border-bottom: 0;
    }

    .api-table tbody tr:nth-child(even) > * {
        background: none;
    }

    .api-table td:not(:first-child)::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--color-heading);
    }
}

.domain-results {
    display: grid;
    gap: var(--space-2);
    max-width: 64rem;
    margin: var(--space-4) 0;
}

/* the result rows of the order take more room than the fields around them */
.card > form.domain-order-form {
    max-width: 64rem;
}

.domain-order-form > :not(.domain-results) {
    max-width: 52rem;
}

.domain-results:empty {
    display: none;
}

.domain-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr) minmax(12rem, 1.5fr);
    align-items: center;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.domain-name {
    overflow-wrap: anywhere;
    color: var(--color-heading);
}

.domain-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    color: var(--color-muted);
}

.domain-price-list {
    margin-top: var(--space-4);
}

.contract-project {
    white-space: nowrap;
}

.contract-card.is-marked,
.addon-row.is-marked {
    outline: 2px solid var(--color-success);
    outline-offset: 2px;
}

.domain-all-prices {
    margin-top: var(--space-2);
}

@media (max-width: 40rem) {
    .domain-row {
        grid-template-columns: 1fr auto;
    }

    .domain-price,
    .domain-action {
        grid-column: 1 / -1;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--color-bg);
    color: var(--color-muted);
}

.badge.warn {
    background: var(--color-warn-bg);
    color: var(--color-warn);
}

.badge.danger {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.authcode-pill {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

/* the general button hover would put white text on the light background of the code */
.authcode-pill:hover:not(:disabled) {
    color: var(--color-heading);
    background: var(--color-primary-soft);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.badge.info {
    background: var(--color-primary-soft);
    color: var(--color-heading);
}

.badge.success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.contract-tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.contract-text {
    margin-top: var(--space-2);
    min-width: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.contract-text .server-facts {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.contract-text .cell-note {
    margin-top: var(--space-1);
    white-space: normal;
}

/* the facts of a contract side by side below a line, wrapping on narrow screens */
.contract-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin: var(--space-3) 0 0;
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

.contract-facts dt {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.contract-facts dd {
    margin: 0;
    color: var(--color-heading);
}

.price-line strong {
    color: var(--color-heading);
}

.price-line .list-price {
    color: var(--color-muted);
}

.price-line .tax-note {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-muted);
}

.addon-lines {
    margin: var(--space-3) 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--color-border);
}

.addon-lines > li + li {
    border-top: 1px solid var(--color-border);
}

.addon-line {
    display: grid;
    /* fixed least widths keep price, term and menu of the separate row grids under each other */
    grid-template-columns: minmax(0, 1fr) minmax(9rem, auto) minmax(11rem, auto) minmax(7.5rem, auto);
    gap: var(--space-1) var(--space-3);
    align-items: center;
    min-height: 44px;
    padding: var(--space-1) 0;
}

.addon-line-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.addon-line-name .cell-note {
    white-space: pre-line;
}

.addon-line-name .contract-number {
    margin-right: var(--space-3);
}

.addon-line-name .badges {
    display: inline-flex;
    margin-left: var(--space-2);
    vertical-align: middle;
}

.addon-line-price {
    justify-self: end;
    font-weight: 600;
    color: var(--color-heading);
    white-space: nowrap;
}

.addon-line-term {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.action-menu {
    position: relative;
}

.action-menu-list {
    position: absolute;
    right: 0;
    z-index: 20;
    min-width: 16rem;
    margin-top: var(--space-1);
    padding: var(--space-1) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.action-menu-group + .action-menu-group {
    border-top: 1px solid var(--color-border);
}

.action-menu-group.staff {
    background: var(--color-bg);
}

.action-menu-title {
    display: block;
    padding: var(--space-2) var(--space-3) 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.action-menu-list button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-radius: 0;
    text-align: left;
    background: none;
    color: var(--color-text);
    font-weight: 400;
}

.action-menu-list button:hover:not(:disabled),
.action-menu-list button:focus {
    color: var(--color-heading);
    background: var(--color-primary-soft);
}

.action-menu-list button:focus-visible {
    outline: 2px solid var(--color-heading);
    outline-offset: -2px;
}

@media (max-width: 40rem) {
    .contract-tools {
        width: 100%;
    }

    .contract-tools > * {
        flex: 1 1 auto;
        white-space: nowrap;
    }

    .contract-tools .button,
    .action-menu > button {
        width: 100%;
    }

    .addon-line {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .addon-line-name,
    .addon-line-price {
        grid-column: 1 / -1;
    }

    .addon-line-price {
        justify-self: start;
    }
}

.password-line {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.password-line input {
    flex: 1;
    min-width: 0;
}

.price-note {
    margin: var(--space-2) 0 0;
    font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar span,
    .steps li[data-state="running"]::before,
    .spinner {
        animation: none;
    }
}

code {
    padding: 0 0.2em;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-bg);
    border-radius: var(--radius-control);
}

.addon-list {
    display: grid;
    gap: var(--space-3);
}

.addon-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    align-items: center;
    margin: 0;
    padding: var(--space-2) var(--space-3);
    font-weight: 400;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
}

.addon-row > input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    min-height: 1.25rem;
    margin: 0;
    accent-color: var(--color-primary);
    box-shadow: none;
}

.addon-info {
    display: flex;
    flex: 1 1 12rem;
    flex-direction: column;
    min-width: 0;
}

.addon-info small {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.addon-points {
    flex: 1 1 100%;
    margin: 0;
    padding-left: var(--space-4);
    font-size: 0.9rem;
    color: var(--color-muted);
}

.addon-row > input ~ .addon-points {
    margin-left: calc(1.25rem + var(--space-3));
}

.addon-points .addon-point-0 {
    margin-left: calc(-1 * var(--space-4));
    list-style: none;
}

.addon-points .addon-point-2 {
    margin-left: var(--space-4);
    list-style-type: circle;
}

.check-help {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-bottom: var(--space-3);
}

.check-help > .check {
    margin-bottom: 0;
}

.help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.4em;
    height: 1.4em;
    font-size: 0.85em;
    line-height: 1;
    border: 1px solid var(--color-input-border);
    border-radius: 50%;
    color: var(--color-primary);
    cursor: help;
}

.help-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + var(--space-2));
    left: 50%;
    z-index: 10;
    width: max-content;
    max-width: min(20rem, 80vw);
    padding: var(--space-2);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-surface);
    background: var(--color-heading);
    border-radius: var(--radius-control);
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
}

.help-tip:hover::after,
.help-tip:focus::after {
    opacity: 1;
    visibility: visible;
}

.addon-price {
    flex: 0 1 auto;
    max-width: 16rem;
    text-align: right;
}

.addon-section {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
}

.addon-section > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--space-2);
    min-height: 44px;
}

.addon-section-body {
    display: grid;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
}

.addon-section h4 {
    margin: 0;
}

.addon-section-state {
    color: var(--color-muted);
}

.addon-section-body > .hint,
.addon-group > .hint {
    margin: 0;
}

.addon-group {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    border: 0;
}

.addon-group legend {
    margin-bottom: var(--space-1);
    font-weight: 600;
}

.stepper {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: var(--space-1);
}

.stepper button {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
}

.stepper output {
    min-width: 2ch;
    text-align: center;
}

.dialog-wide {
    width: min(52rem, calc(100vw - 2rem));
}

@media (max-width: 40rem) {
    .addon-price {
        order: 3;
    }

    .addon-points {
        order: 4;
    }
}

.addon-systems {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    margin: 0 0 var(--space-3);
    padding: 0;
    border: 0;
}

.addon-systems legend {
    width: 100%;
    margin-bottom: var(--space-1);
    font-size: 0.9rem;
    font-weight: 600;
}

.traffic-list {
    display: grid;
    gap: var(--space-2);
}

.traffic-entry {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-control);
}

.traffic-entry.is-failed {
    border-left-color: var(--color-error);
}

.traffic-entry summary {
    cursor: pointer;
    overflow-wrap: anywhere;
}

.traffic-entry h4 {
    margin: var(--space-2) 0 var(--space-1);
}

.traffic-entry pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.partner-rate {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--space-2);
}
