.archiv-calculator {
    --archiv-ink: #15253a;
    --archiv-muted: #5b6878;
    --archiv-line: #d8e0e8;
    --archiv-soft: #f4f7fa;
    --archiv-primary: #0b5f74;
    --archiv-primary-dark: #084958;
    --archiv-accent: #d8a23e;
    color: var(--archiv-ink);
    margin: 1.25rem 0 2rem;
    max-width: 980px;
}

.archiv-calculator *,
.archiv-calculator *::before,
.archiv-calculator *::after {
    box-sizing: border-box;
}

.archiv-intro {
    background: linear-gradient(135deg, #eef7f8 0%, #f9fbfc 70%);
    border: 1px solid #cfe1e5;
    border-left: 5px solid var(--archiv-primary);
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1.2rem 1.35rem;
}

.archiv-intro h3,
.archiv-result h3,
.archiv-bookings h4 {
    color: var(--archiv-ink);
    line-height: 1.25;
    margin: 0;
}

.archiv-intro p:last-child {
    color: var(--archiv-muted);
    margin: .55rem 0 0;
}

.archiv-eyebrow {
    color: var(--archiv-primary);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 0 .35rem;
    text-transform: uppercase;
}

.archiv-form {
    display: grid;
    gap: 1rem;
}

.archiv-card {
    background: #fff;
    border: 1px solid var(--archiv-line);
    border-radius: 12px;
    margin: 0;
    min-width: 0;
    padding: 1rem 1.15rem 1.2rem;
}

.archiv-card legend {
    align-items: center;
    color: var(--archiv-ink);
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    padding: 0 .35rem;
}

.archiv-card legend span {
    align-items: center;
    background: var(--archiv-primary);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: .78rem;
    height: 1.65rem;
    justify-content: center;
    margin-right: .5rem;
    width: 1.65rem;
}

.archiv-grid {
    display: grid;
    gap: 1rem;
}

.archiv-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archiv-field {
    min-width: 0;
}

.archiv-field--wide {
    grid-column: 1 / -1;
}

.archiv-field label,
.archiv-field--notice strong {
    display: block;
    font-size: .9rem;
    font-weight: 650;
    margin-bottom: .38rem;
}

.archiv-field input,
.archiv-field select {
    background: #fff;
    border: 1px solid #aeb9c5;
    border-radius: 7px;
    color: var(--archiv-ink);
    font: inherit;
    min-height: 2.72rem;
    padding: .6rem .7rem;
    width: 100%;
}

.archiv-field select {
    cursor: pointer;
}

.archiv-field input:focus,
.archiv-field select:focus {
    border-color: var(--archiv-primary);
    box-shadow: 0 0 0 3px rgba(11, 95, 116, .14);
    outline: none;
}

.archiv-field input.is-invalid {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .1);
}

.archiv-field small,
.archiv-help {
    color: var(--archiv-muted);
    display: block;
    font-size: .78rem;
    line-height: 1.45;
    margin-top: .35rem;
}

.archiv-field small a {
    white-space: nowrap;
}

.archiv-input-unit {
    align-items: stretch;
    display: flex;
}

.archiv-input-unit input {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    min-width: 0;
    text-align: right;
}

.archiv-input-unit span {
    align-items: center;
    background: var(--archiv-soft);
    border: 1px solid #aeb9c5;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    color: var(--archiv-muted);
    display: inline-flex;
    font-size: .86rem;
    justify-content: center;
    min-width: 3.2rem;
    padding: 0 .65rem;
}

.archiv-field--notice {
    background: #f5fafb;
    border: 1px solid #cfe1e5;
    border-radius: 8px;
    padding: .8rem .9rem;
}

.archiv-field--notice strong {
    color: var(--archiv-primary-dark);
}

.archiv-field--notice p {
    color: var(--archiv-muted);
    font-size: .82rem;
    line-height: 1.45;
    margin: 0;
}

.archiv-form-actions,
.archiv-result-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.archiv-form-actions {
    padding: .15rem 0 .35rem;
}

.archiv-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 2.75rem;
    padding: .66rem 1rem;
    text-decoration: none;
}

.archiv-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(11, 95, 116, .2);
    outline: 2px solid var(--archiv-primary);
    outline-offset: 2px;
}

.archiv-button--primary {
    background: var(--archiv-primary);
    color: #fff;
}

.archiv-button--primary:hover {
    background: var(--archiv-primary-dark);
}

.archiv-button--secondary {
    background: #fff;
    border-color: var(--archiv-primary);
    color: var(--archiv-primary-dark);
}

.archiv-button--ghost {
    background: transparent;
    border-color: var(--archiv-line);
    color: var(--archiv-muted);
}

.archiv-button:disabled {
    cursor: wait;
    opacity: .72;
}

.archiv-button.is-loading::after {
    animation: archiv-spin .7s linear infinite;
    border: 2px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    border-top-color: #fff;
    content: '';
    height: 1rem;
    margin-left: .55rem;
    width: 1rem;
}

@keyframes archiv-spin {
    to { transform: rotate(360deg); }
}

.archiv-message,
.archiv-loading {
    border-radius: 8px;
    line-height: 1.5;
    margin: .8rem 0;
    padding: .8rem .95rem;
}

.archiv-message--error {
    background: #fff1f0;
    border: 1px solid #f2b8b5;
    color: #8d1a12;
}

.archiv-message--info {
    background: #eef7f8;
    border: 1px solid #bdd9df;
    color: #194d59;
}

.archiv-loading {
    background: var(--archiv-soft);
    color: var(--archiv-muted);
}

.archiv-output:not(:empty) {
    margin-top: .8rem;
}

.archiv-result-actions {
    justify-content: flex-end;
    margin-bottom: .65rem;
}

.archiv-result {
    background: #fff;
    border: 1px solid var(--archiv-line);
    border-radius: 12px;
    overflow: hidden;
    padding: 1.15rem;
}

.archiv-result__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.archiv-badge {
    background: #edf6ee;
    border: 1px solid #cce1cf;
    border-radius: 999px;
    color: #2c6335;
    font-size: .72rem;
    font-weight: 700;
    padding: .28rem .55rem;
    white-space: nowrap;
}

.archiv-result__basis {
    color: var(--archiv-muted);
    font-size: .85rem;
    margin: .65rem 0 1rem;
}

.archiv-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.archiv-result-table,
.archiv-booking-table {
    border-collapse: collapse;
    font-size: .86rem;
    margin: 0;
    min-width: 640px;
    width: 100%;
}

.archiv-result-table th,
.archiv-result-table td,
.archiv-booking-table th,
.archiv-booking-table td {
    border-bottom: 1px solid #e2e7ec;
    padding: .62rem .7rem;
    text-align: left;
    vertical-align: top;
}

.archiv-result-table thead th,
.archiv-booking-table thead th {
    background: var(--archiv-ink);
    color: #fff;
    font-weight: 700;
}

.archiv-result-table td:not(:first-child),
.archiv-booking-table td:last-child {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.archiv-result-table td small {
    color: var(--archiv-muted);
    display: block;
    font-size: .72rem;
    margin-top: .15rem;
}

.archiv-result-table tbody tr:nth-child(even),
.archiv-booking-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.archiv-row--subtotal th,
.archiv-row--subtotal td {
    font-weight: 700;
}

.archiv-row--total th,
.archiv-row--total td {
    background: #eaf4f6;
    border-bottom-color: #b8d5dc;
    color: var(--archiv-primary-dark);
    font-size: .94rem;
    font-weight: 800;
}

.archiv-row--change th,
.archiv-row--change td {
    font-weight: 700;
}

.archiv-bookings {
    margin-top: 1.35rem;
}

.archiv-bookings h4 {
    font-size: 1rem;
}

.archiv-help {
    margin: .3rem 0 .65rem;
}

.archiv-result__legal {
    color: var(--archiv-muted);
    font-size: .76rem;
    line-height: 1.45;
    margin: 1rem 0 0;
}

.archiv-pdf {
    background: #fff;
    border: 1px solid var(--archiv-line);
    border-radius: 12px;
    margin-top: 1rem;
    overflow: hidden;
}

.archiv-pdf[hidden] {
    display: none;
}

.archiv-pdf__header {
    align-items: center;
    background: var(--archiv-soft);
    border-bottom: 1px solid var(--archiv-line);
    display: flex;
    justify-content: space-between;
    padding: .65rem .8rem;
}

.archiv-pdf__header button {
    background: transparent;
    border: 0;
    color: var(--archiv-muted);
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
}

.archiv-pdf iframe {
    border: 0;
    display: block;
    height: 680px;
    width: 100%;
}

@media (max-width: 700px) {
    .archiv-grid--2 {
        grid-template-columns: 1fr;
    }

    .archiv-field--wide {
        grid-column: auto;
    }

    .archiv-card {
        padding: .85rem;
    }

    .archiv-result__header {
        display: block;
    }

    .archiv-badge {
        display: inline-block;
        margin-top: .6rem;
    }

    .archiv-form-actions .archiv-button {
        width: 100%;
    }

    .archiv-pdf iframe {
        height: 520px;
    }
}

@media print {
    .archiv-form,
    .archiv-intro,
    .archiv-result-actions,
    .archiv-pdf {
        display: none !important;
    }

    .archiv-result {
        border: 0;
        padding: 0;
    }
}