:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f3f5f7;
    color: #17202a;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

a {
    color: #075aa8;
    overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 100%;
    margin-bottom: 0.65rem;
    font-size: clamp(2rem, 5vw, 4.35rem);
    line-height: 1.02;
    letter-spacing: 0em;
}

h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.2;
}

h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.lsa-shell {
    width: min(100% - clamp(2rem, 6vw, 5rem), 92rem);
    margin-inline: auto;
}

.lsa-skip-link {
    position: fixed;
    z-index: 100;
    inset: 0.75rem auto auto 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    color: #111111;
    transform: translateY(-200%);
}

.lsa-skip-link:focus {
    transform: translateY(0);
}

.lsa-header {
    padding-block: clamp(3rem, 8vw, 7rem);
    background: #132d46;
    color: #ffffff;
}

.lsa-eyebrow {
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lsa-intro {
    max-width: 100%;
    margin-bottom: 0;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: #d7e2ec;
}

.lsa-main {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding-block: clamp(2rem, 5vw, 4.5rem);
}

.lsa-panel {
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 0.0625rem solid #d8dee5;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 0.7rem 2rem rgb(25 42 59 / 0.06);
}

.lsa-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.lsa-field {
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.lsa-field-wide {
    grid-column: 1 / -1;
}

.lsa-field label {
    font-weight: 700;
}

.lsa-field input,
.lsa-field select {
    min-height: 3rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 0.0625rem solid #9ca9b6;
    border-radius: 0.55rem;
    background: #ffffff;
    color: #111111;
}

.lsa-field input:focus,
.lsa-field select:focus,
.lsa-button:focus-visible,
summary:focus-visible {
    outline: 0.2rem solid #ffbf47;
    outline-offset: 0.15rem;
}

.lsa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.lsa-actions-compact {
    justify-content: flex-end;
}

.lsa-button {
    min-height: 2.8rem;
    padding: 0.65rem 1rem;
    border: 0.0625rem solid transparent;
    border-radius: 0.55rem;
    font-weight: 750;
}

.lsa-button-primary {
    background: #0b6b3a;
    color: #ffffff;
}

.lsa-button-primary:hover {
    background: #084f2c;
}

.lsa-button-secondary {
    border-color: #93a1af;
    background: #ffffff;
    color: #17202a;
}

.lsa-button-secondary:hover {
    background: #edf1f4;
}

.lsa-note,
.lsa-footer {
    color: #4d5c69;
}

.lsa-note {
    margin: 1.25rem 0 0;
}

.lsa-section-heading,
.lsa-report-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.lsa-section-heading h2,
.lsa-report-toolbar h2 {
    margin-bottom: 0;
}

.lsa-section-heading output {
    font-weight: 800;
}

progress {
    width: 100%;
    height: 1rem;
    margin-top: 1.4rem;
    accent-color: #0b6b3a;
}

.lsa-alert {
    margin-top: 1.25rem;
    padding: clamp(1rem, 2vw, 1.4rem);
    border: 0.125rem solid;
    border-radius: 0.75rem;
}

.lsa-alert h3 {
    margin-bottom: 0.65rem;
}

.lsa-alert-error {
    border-color: #b42333;
    background: #fff3f4;
    color: #65101a;
}

.lsa-alert-content {
    display: grid;
    gap: 0.8rem;
}

.lsa-help-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.35rem;
}

.lsa-technical-message {
    max-height: 16rem;
    margin: 0.7rem 0 0;
    padding: 0.8rem;
    overflow: auto;
    border-radius: 0.45rem;
    background: #211f20;
    color: #ffffff;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.lsa-error-meta {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
}

.lsa-status {
    margin: 0.75rem 0 0;
    font-weight: 650;
}

.lsa-report-toolbar {
    margin-bottom: 1.5rem;
}

.lsa-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.lsa-summary-card {
    min-height: 8.5rem;
    padding: 1.1rem;
    border: 0.0625rem solid #d8dee5;
    border-radius: 0.8rem;
    background: #ffffff;
}

.lsa-summary-card strong {
    display: block;
    margin-top: 0.4rem;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1;
}

.lsa-summary-card span {
    color: #52616f;
}

#lsa-report {
    display: grid;
    gap: 1.5rem;
}

.lsa-table-wrap {
    overflow-x: auto;
    border: 0.0625rem solid #d8dee5;
    border-radius: 0.65rem;
}

table {
    width: 100%;
    min-width: 68rem;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem;
    border-bottom: 0.0625rem solid #e0e5ea;
    text-align: left;
    vertical-align: top;
}

th {
    background: #edf1f4;
    font-size: 0.9rem;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.lsa-url-cell {
    max-width: 28rem;
}

.lsa-score {
    display: inline-flex;
    min-width: 3.25rem;
    justify-content: center;
    padding: 0.25rem 0.45rem;
    border-radius: 999rem;
    font-weight: 800;
}

.lsa-score-good {
    background: #d8f3e2;
    color: #075b2c;
}

.lsa-score-medium {
    background: #fff0c7;
    color: #6d4b00;
}

.lsa-score-poor {
    background: #fbd9dc;
    color: #8b1723;
}

.lsa-status-error {
    padding: 0.6rem 0.75rem;
    border-radius: 0.45rem;
    background: #fbd9dc;
    color: #8b1723;
}

.lsa-score-na {
    background: #e7ebef;
    color: #4e5a66;
}

.lsa-details {
    display: grid;
    gap: 0.8rem;
}

.lsa-details details {
    border: 0.0625rem solid #d8dee5;
    border-radius: 0.7rem;
    background: #ffffff;
}

.lsa-details summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 750;
}

.lsa-detail-content {
    padding: 0 1rem 1rem;
}

.lsa-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem;
    margin: 1rem 0;
}

.lsa-metric {
    padding: 0.75rem;
    border-radius: 0.55rem;
    background: #edf1f4;
}

.lsa-metric strong,
.lsa-metric span {
    display: block;
}

.lsa-issue-list,
.lsa-common-list,
.lsa-error-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lsa-issue,
.lsa-common-item,
.lsa-error-item {
    padding: 0.9rem;
    border: 0.0625rem solid #d8dee5;
    border-radius: 0.6rem;
}

.lsa-issue h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.lsa-issue p,
.lsa-common-item p,
.lsa-error-item p {
    margin-bottom: 0;
}

.lsa-issue-meta {
    color: #52616f;
    font-size: 0.9rem;
}

.lsa-empty {
    margin-bottom: 0;
    color: #52616f;
}

.lsa-footer {
    padding-block: 1.8rem;
    border-top: 0.0625rem solid #d8dee5;
    background: #ffffff;
}

.lsa-footer p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

@media (max-width: 62rem) {
    .lsa-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lsa-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 42rem) {
    .lsa-form,
    .lsa-summary {
        grid-template-columns: 1fr;
    }

    .lsa-field-wide {
        grid-column: auto;
    }

    .lsa-actions,
    .lsa-actions-compact {
        align-items: stretch;
        flex-direction: column;
    }

    .lsa-button {
        width: 100%;
    }
}

@media print {
    body {
        background: #ffffff;
        color: #000000;
        font-size: 9pt;
    }

    .lsa-header {
        padding-block: 1rem;
        background: #ffffff;
        color: #000000;
    }

    .lsa-header .lsa-intro,
    .lsa-footer,
    #lsa-audit-form,
    #lsa-progress-panel,
    .lsa-report-toolbar .lsa-actions,
    .lsa-note {
        display: none !important;
    }

    .lsa-shell {
        width: 100%;
    }

    .lsa-main {
        padding-block: 1rem;
    }

    .lsa-panel,
    .lsa-summary-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .lsa-details details {
        break-inside: avoid;
    }

    .lsa-details details > * {
        display: block;
    }

    .lsa-table-wrap {
        overflow: visible;
    }

    table {
        min-width: 0;
        font-size: 7.5pt;
    }

    a {
        color: #000000;
        text-decoration: none;
    }
}

/* Kompakter, zweitseitiger PDF-Bericht */
.lsa-print-report {
    display: none;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 11mm 12mm 13mm;
    }

    body > .lsa-skip-link,
    body > .lsa-header,
    body > .lsa-footer,
    #lsa-main > section:not(.lsa-print-report) {
        display: none !important;
    }

    .lsa-main,
    .lsa-shell {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .lsa-print-report {
        display: block !important;
        color: #17202a;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9pt;
        line-height: 1.35;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .lsa-print-page {
        position: relative;
        box-sizing: border-box;
        width: 100%;
        min-height: 272mm;
        margin: 0;
        padding: 0 0 12mm;
        overflow: hidden;
        background: #ffffff;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .lsa-print-page + .lsa-print-page {
        break-before: page;
        page-break-before: always;
    }

    .lsa-print-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .lsa-print-header {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(42mm, 1fr);
        align-items: stretch;
        gap: 7mm;
        padding-bottom: 5mm;
        border-bottom: 0.6mm solid #e3e7eb;
    }

    .lsa-print-subheader {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8mm;
        padding-bottom: 3.5mm;
        border-bottom: 0.45mm solid #e3e7eb;
    }

    .lsa-print-title {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        padding: 5mm 6mm;
        border-radius: 3.5mm;
        background: #18396c;
        color: #ffffff;
    }

    .lsa-print-header h1 {
        margin: 0.8mm 0 1.6mm;
        color: #ffffff;
        font-size: 22pt;
        line-height: 1.05;
        letter-spacing: -0.4pt;
    }

    .lsa-print-title .lsa-print-kicker,
    .lsa-print-title .lsa-print-url {
        color: rgba(255, 255, 255, 0.82);
    }

    .lsa-print-kicker,
    .lsa-print-section-label {
        margin: 0;
        color: #596675;
        font-size: 8pt;
        font-weight: 800;
        letter-spacing: 0.8pt;
        text-transform: uppercase;
    }

    .lsa-print-url,
    .lsa-print-small {
        margin: 0;
        color: #667382;
        font-size: 8pt;
        overflow-wrap: anywhere;
    }

    .lsa-print-meta {
        display: grid;
        align-content: center;
        gap: 1.2mm;
        min-width: 0;
        padding: 4mm 4.5mm;
        border-radius: 3.5mm;
        background: #f2f5f7;
        text-align: right;
    }

    .lsa-print-meta span {
        color: #64717f;
        font-size: 7.5pt;
    }

    .lsa-print-score-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6mm;
        margin: 7mm 0 6mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lsa-print-score-card {
        display: grid;
        place-items: center;
        min-height: 49mm;
        padding: 3mm;
        border: 0.35mm solid #e1e6ea;
        border-radius: 4mm;
        background: #fbfcfd;
    }

    .lsa-print-ring {
        position: relative;
        display: grid;
        width: 41mm;
        height: 46mm;
        place-items: center;
        color: #9aa4ad;
    }

    .lsa-print-ring svg {
        position: absolute;
        top: 0;
        width: 37mm;
        height: 37mm;
        transform: rotate(-90deg);
    }

    .lsa-print-ring circle {
        fill: none;
        stroke-width: 10;
    }

    .lsa-print-ring-track {
        stroke: #e6eaed;
    }

    .lsa-print-ring-value {
        stroke: currentColor;
        stroke-linecap: round;
    }

    .lsa-tone-good {
        color: #0cce6b;
    }

    .lsa-tone-medium {
        color: #ffa400;
    }

    .lsa-tone-poor {
        color: #ff4e42;
    }

    .lsa-tone-na {
        color: #9aa4ad;
    }

    .lsa-print-ring-number {
        position: absolute;
        top: 11.2mm;
        font-size: 17pt;
        line-height: 1;
        color: currentColor;
    }

    .lsa-print-ring-label {
        position: absolute;
        bottom: 0;
        width: 100%;
        color: #2d3741;
        font-size: 9.5pt;
        font-weight: 800;
        text-align: center;
    }

    .lsa-print-evaluation {
        padding: 4.5mm 5mm;
        break-inside: avoid;
        page-break-inside: avoid;
        border-left: 1.5mm solid #18396c;
        border-radius: 0 3mm 3mm 0;
        background: #f1f5fa;
    }

    .lsa-print-evaluation h2 {
        margin: 1.2mm 0 1.5mm;
        font-size: 14.5pt;
        line-height: 1.15;
    }

    .lsa-print-evaluation p:last-child {
        margin: 0;
        color: #475564;
        font-size: 9pt;
    }

    .lsa-print-facts {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3mm;
        margin: 7mm 0;
    }

    .lsa-print-fact {
        padding: 3.5mm;
        border: 0.3mm solid #e0e5e9;
        border-radius: 2.5mm;
    }

    .lsa-print-fact span,
    .lsa-print-fact strong {
        display: block;
    }

    .lsa-print-fact span {
        color: #697684;
        font-size: 7.2pt;
    }

    .lsa-print-fact strong {
        margin-top: 1mm;
        font-size: 12pt;
    }

    .lsa-print-subheader {
        margin-top: 5mm;
        break-after: avoid;
        page-break-after: avoid;
    }

    .lsa-print-page-two .lsa-print-subheader {
        margin-top: 0;
    }

    .lsa-print-subheader > div:first-child {
        display: none;
    }

    .lsa-print-subheader .lsa-print-section-label {
        color: #17202a;
        font-size: 13pt;
        letter-spacing: 0;
        text-transform: none;
    }

    .lsa-print-table {
        width: 100%;
        min-width: 0;
        margin-top: 3.5mm;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 7.2pt;
    }

    .lsa-print-table th,
    .lsa-print-table td {
        padding: 1.35mm 1.8mm;
        border-bottom: 0.25mm solid #e4e8eb;
        text-align: center;
        vertical-align: middle;
    }

    .lsa-print-table thead {
        display: table-header-group;
    }

    .lsa-print-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lsa-print-table th {
        background: #eef2f5;
        color: #495765;
        font-size: 6.8pt;
        line-height: 1.2;
    }

    .lsa-print-table th:first-child,
    .lsa-print-table td:first-child {
        width: 47%;
        text-align: left;
    }

    .lsa-print-table td:first-child strong,
    .lsa-print-table td:first-child span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lsa-print-table td:first-child span {
        color: #75818c;
        font-size: 6.5pt;
    }

    .lsa-print-score {
        display: inline-grid;
        width: 7mm;
        height: 7mm;
        place-items: center;
        border: 0.55mm solid currentColor;
        border-radius: 50%;
        font-size: 6.8pt;
        font-weight: 900;
    }

    .lsa-print-overflow-note {
        margin: 3mm 0 0;
        color: #6b7783;
        font-size: 7pt;
    }

    .lsa-print-page-footer {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: space-between;
        padding-top: 2.5mm;
        border-top: 0.25mm solid #e1e5e8;
        color: #7a858f;
        font-size: 6.8pt;
    }
}
