:root {
    color: #202124;
    background: #202020;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

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

html,
body {
    min-width: 18rem;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100svh;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/*
    Replace homepage.jpg with the filename of the existing homepage photograph.
    Use "background-size: contain" instead of "cover" if the entire image must
    always remain visible and letterboxing is acceptable.
*/
.homepage {
    min-height: 100vh;
    min-height: 100svh;

    display: grid;
    place-items: center;
    padding: 1rem;

    background-color: #EDEDED;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.content-panel {
    box-sizing: border-box;
    width: 700px;
    height: 500px;

    display: grid;
    grid-template-rows: minmax(50px, auto) minmax(0, 1fr);
    gap: 0;

    border: 1px solid #888;
    border-radius: 0.3rem;
    overflow: hidden;
}

.content-panel__header {
    box-sizing: border-box;
    min-height: 50px;
    margin: 0;
    padding: 25px;

    display: flex;
    align-items: center;

    background-color: #fff;
}

.content-panel__title {
    width: 100%;
    margin: 0;
    text-align: left;
}

.content-panel__body {
    min-width: 0;
    min-height: 0;
    margin: 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 282px;
    gap: 0;
}

.content-panel__left {
    background: url(backgrdleft.jpg) repeat-x bottom;
    min-width: 0;
}

.content-panel__right {
    background: url(hardworker.jpg) no-repeat bottom;
    width: 282px;
}

.legal-links {
    position: fixed;
    z-index: 1;
    inset-inline-start: clamp(0.75rem, 2vw, 1.5rem);
    inset-block-end: max(0.75rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 0.4rem;
    background: rgb(0 0 0 / 0.58);
    box-shadow: 0 0.125rem 0.5rem rgb(0 0 0 / 0.2);
}

.legal-link {
    display: inline-block;
    padding: 0.35rem 0.45rem;
    border-radius: 0.25rem;
    color: #fff;
    font: 600 0.78rem/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.015em;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.legal-link:hover {
    background: rgb(255 255 255 / 0.16);
}

.legal-link:focus-visible,
.close-button:focus-visible,
.imprint-content a:focus-visible,
.legal-page a:focus-visible {
    outline: 0.2rem solid #0b74de;
    outline-offset: 0.18rem;
}

.imprint-dialog {
    width: min(36rem, calc(100% - 2rem));
    max-height: min(48rem, calc(100dvh - 2rem));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgb(0 0 0 / 0.18);
    border-radius: 0.8rem;
    background: #fff;
    color: #202124;
    box-shadow:
        0 1.5rem 4rem rgb(0 0 0 / 0.38),
        0 0.25rem 1rem rgb(0 0 0 / 0.18);
}

.imprint-dialog::backdrop {
    background: rgb(0 0 0 / 0.62);
}

.imprint-dialog[open] {
    animation: dialog-in 150ms ease-out;
}

.imprint-dialog[open]::backdrop {
    animation: backdrop-in 150ms ease-out;
}

.imprint-card {
    display: flex;
    max-height: inherit;
    flex-direction: column;
}

.imprint-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.75rem;
    padding: 0.7rem 0.8rem 0.7rem 1.35rem;
    border-bottom: 1px solid #dadce0;
    background: #f8f9fa;
}

.imprint-header h1 {
    margin: 0;
    font-size: clamp(1.25rem, 4vw, 1.55rem);
    font-weight: 650;
    line-height: 1.2;
}

.imprint-header form {
    margin: 0;
}

.close-button {
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    appearance: none;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #3c4043;
    font: 400 2rem/1 system-ui, sans-serif;
    cursor: pointer;
}

.close-button:hover {
    background: #e8eaed;
    color: #000;
}

.imprint-content {
    min-height: 0;
    padding: clamp(1.1rem, 4vw, 1.6rem);
    overflow: auto;
    overscroll-behavior: contain;
}

.legal-kicker {
    margin: 0 0 1rem;
    color: #5f6368;
    font-size: 0.92rem;
    font-weight: 650;
}

.postal-address {
    margin: 0;
    color: inherit;
    font-style: normal;
    line-height: 1.55;
}

.postal-address strong {
    font-size: 1.08rem;
}

.contact-details {
    display: grid;
    gap: 0;
    margin: 1.35rem 0 0;
    border-top: 1px solid #e2e5e9;
}

.contact-details > div {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.38fr) minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e2e5e9;
}

.contact-details dt {
    color: #5f6368;
    font-weight: 650;
}

.contact-details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.imprint-content a,
.legal-page a {
    color: #075fba;
    text-underline-offset: 0.15em;
}

.imprint-content a:hover,
.legal-page a:hover {
    text-decoration-thickness: 0.12em;
}

.replace-before-deployment {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.dialog-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin: 1.35rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e5e9;
    font-size: 0.9rem;
}

/* Standalone legal pages */
.legal-page-body {
    padding: clamp(1rem, 4vw, 3rem);
    background: #e9ecef;
}

.legal-page {
    width: min(52rem, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid rgb(0 0 0 / 0.12);
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 0.8rem 2.5rem rgb(0 0 0 / 0.12);
    line-height: 1.62;
}

.legal-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid #dadce0;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-weight: 650;
}

.legal-page h1 {
    margin: 0;
    font-size: clamp(1.8rem, 7vw, 2.55rem);
    line-height: 1.15;
}

.legal-page-header > p:last-child {
    margin-bottom: 0;
}

.legal-page section + section {
    margin-top: 2rem;
}

.legal-page h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.15rem, 4vw, 1.35rem);
    line-height: 1.3;
}

.legal-page p {
    margin: 0.75rem 0 0;
}

.legal-page .contact-details {
    margin-top: 0.5rem;
}

.legal-page-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dadce0;
    color: #5f6368;
    font-size: 0.9rem;
}

.privacy-page section p {
    max-width: 72ch;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 30rem) {
    .imprint-dialog {
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 0.55rem;
    }

    .imprint-header {
        padding-inline-start: 1rem;
    }

    .contact-details > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .legal-page-body {
        padding: 0;
        background: #fff;
    }

    .legal-page {
        min-height: 100vh;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .imprint-dialog[open],
    .imprint-dialog[open]::backdrop {
        animation: none;
    }
}

@media (forced-colors: active) {
    .legal-links,
    .imprint-dialog,
    .imprint-header,
    .legal-page {
        border: 1px solid CanvasText;
    }
}
