html {
    text-rendering: optimizeLegibility;
    /* Prevent horizontal "jump" when switching between short/long pages (scrollbar appears/disappears). */
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
    }
}

body {
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
}

.prose {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.text-page {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.prose p + p,
.prose p + ul,
.prose p + ol,
.prose ul + p,
.prose ol + p {
    margin-top: 1rem;
}

.prose h1,
.prose h2,
.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.text-page h1 {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
    text-wrap: balance;
}

.member-area h1,
.member-area h2,
.member-area h3 {
    font-weight: 700;
    color: #111827;
}

.member-area h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 0 0 1rem;
}

.member-area h1 + p {
    margin-top: 0;
}

.member-area p {
    color: #4b5563;
}

.member-area ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: #4b5563;
}

.member-area .error {
    color: #dc2626;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.member-area .member-success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.agb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.agb-modal-card {
    width: min(900px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    padding: 1.25rem;
}

.agb-modal-card h2 {
    margin: 0 0 0.75rem;
    color: #111827;
    font-size: 1.4rem;
    line-height: 1.3;
}

.agb-modal-hint {
    margin: 0 0 0.75rem;
    color: #374151;
    font-size: 0.95rem;
}

.agb-modal-content {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    background: #f9fafb;
    color: #1f2937;
}

.agb-modal-content p {
    margin: 0 0 0.8rem;
}

.agb-modal-actions {
    margin-top: 1rem;
    text-align: right;
}

.agb-modal-actions button {
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.agb-modal-actions button:hover {
    background: #15803d;
}

.agb-modal-link {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}

.agb-modal-link a {
    color: #ea580c;
}

.agb-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.agb-editor-toolbar button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 0.45rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.agb-editor-toolbar select {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 0.45rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
}

.agb-editor-toolbar select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.agb-editor-toolbar button:hover {
    border-color: #f97316;
    color: #9a3412;
    background: #fff7ed;
}

.agb-editor-surface {
    min-height: 20rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    background: #ffffff;
    color: #111827;
    line-height: 1.6;
    overflow: auto;
}

.agb-editor-surface:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.agb-editor-surface h1,
.agb-editor-surface h2,
.agb-editor-surface h3 {
    margin: 0.8rem 0 0.5rem;
    color: #111827;
}

.agb-editor-surface p {
    margin: 0 0 0.7rem;
}

.agb-editor-surface ul,
.agb-editor-surface ol {
    margin: 0 0 0.7rem 1.4rem;
}

.member-area .sidelink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    color: #111827;
    font-weight: 650;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    justify-content: flex-start;
}

.member-area .sidelink:hover {
    background: #f3f4f6;
    color: #ea580c;
}

.member-area .sidelink_active {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: #9a3412;
}

.member-area .sidelink:focus-visible {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.member-area .sidelink__icon {
    width: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex: 0 0 1.5rem;
    line-height: 1;
}

.member-area .sidelink__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.member-area .sidelink_active .sidelink__icon,
.member-area .sidelink:hover .sidelink__icon {
    color: currentColor;
}

.member-area .member-sidenav__title {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    font-weight: 800;
    color: #374151;
    margin: 0 0 0.75rem;
    text-align: left;
}

.member-area .member-sidenav__section {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 0.9rem 0 0.45rem;
    text-align: left;
}

.member-area .member-sidenav__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.member-area .member-sidenav__divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 1rem 0;
}

.member-area .member-sidenav {
    text-align: left;
}

.member-area .member-sidenav-drawer {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.member-area .member-sidenav-drawer__summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #111827;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
}

.member-area .member-sidenav-drawer__summary:hover {
    background: #f9fafb;
}

.member-area .member-sidenav-drawer__summary::-webkit-details-marker {
    display: none;
}

.member-area .member-sidenav-drawer[open] .member-sidenav-drawer__summary {
    margin-bottom: 0.5rem;
}

.member-area .member-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    background: #f97316;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.member-area .member-cta:hover {
    background: #ea580c;
}

.member-area .member-dashboard h1 {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.member-area .member-dashboard p {
    max-width: 80ch;
}

.member-area .member-dashboard {
    background:
        radial-gradient(1200px 220px at 20% 0%, rgba(249, 115, 22, 0.10), rgba(255, 255, 255, 0)),
        #ffffff;
}

.member-area .max-w-7xl {
    /* Member area should feel like an app, not a narrow marketing page. */
    max-width: 110rem;
}

.member-area .member-layout {
    align-items: start;
}

@media (min-width: 1024px) {
    .member-area .member-layout {
        /* Tailwind build seems to miss some col-span utilities; define an explicit layout. */
        grid-template-columns: 20rem minmax(0, 1fr);
    }

    .member-area .member-layout > aside {
        grid-column: 1;
    }

    .member-area .member-layout > main {
        grid-column: 2;
        min-width: 0;
    }

    .member-area .member-sidenav-drawer {
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .member-area .member-sidenav-drawer__summary {
        display: none;
    }

    .member-area .member-sidenav-drawer > .member-sidenav-drawer__content {
        display: block;
    }
}

@media (min-width: 1024px) {
    .member-area aside > .bg-white {
        position: sticky;
        top: 6.5rem; /* below the fixed header */
        max-height: calc(100vh - 7.5rem);
        overflow: auto;
    }

    .member-area aside > .bg-white::-webkit-scrollbar {
        width: 10px;
    }

    .member-area aside > .bg-white::-webkit-scrollbar-thumb {
        background: #e5e7eb;
        border-radius: 999px;
        border: 2px solid #ffffff;
    }

    .member-area aside > .bg-white::-webkit-scrollbar-thumb:hover {
        background: #d1d5db;
    }
}

.member-area form {
    margin-top: 0.75rem;
}

.member-area fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

.member-area legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: #374151;
}

.member-area input[type="text"],
.member-area input[type="email"],
.member-area input[type="password"],
.member-area input[type="tel"],
.member-area input[type="number"],
.member-area input[type="url"],
.member-area textarea,
.member-area select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #111827;
}

.member-area input:focus,
.member-area textarea:focus,
.member-area select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.member-area input[type="submit"],
.member-area button[type="submit"] {
    background: #f97316;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.member-area input[type="submit"]:hover,
.member-area button[type="submit"]:hover {
    background: #ea580c;
}

.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.prose ol {
    list-style: decimal;
    padding-left: 1.5rem;
}

.prose li {
    margin-top: 0.4rem;
}

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

.listing-card {
    overflow: hidden;
}

.listing-card__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem 1.5rem;
}

.listing-card__main {
    min-width: 0;
}

.listing-card__heading {
    margin-bottom: 1rem;
}

.listing-card__aside {
    justify-self: end;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 9.75rem;
    gap: 0.75rem;
}

.listing-card__portrait-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f3f4f6;
}

.listing-card__portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.listing-card__logo-wrap {
    width: 100%;
    min-height: 9.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.65rem;
    background: #ffffff;
    padding: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-card__logo {
    width: 100%;
    max-height: 7.5rem;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    nav .w-full {
        padding: 0.75rem 1rem;
    }

    .text-page {
        padding-top: 6.5rem;
        padding-bottom: 3rem;
    }

    #suche h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    #suche p {
        font-size: 1rem;
    }

    .prose {
        font-size: 1rem;
        line-height: 1.7;
    }

    .text-page h1 {
        font-size: 1.45rem;
        line-height: 1.25;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .listing-card__layout {
        gap: 0.75rem 1rem;
    }
}

@media (max-width: 640px) {
    .listing-card__layout {
        grid-template-columns: 1fr;
    }

    .listing-card__aside {
        align-self: flex-end;
        grid-auto-columns: 9rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    #suche h1 {
        font-size: 1.8rem;
    }

    .py-20 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-height: 780px) {
    #suche {
        align-items: flex-start;
        padding-top: 7rem;
    }
}

@media (min-width: 1024px) {
    .text-page {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

@media (min-width: 1024px) {
    .prose {
        font-size: 1.125rem;
        line-height: 1.8;
    }

    .text-page .prose {
        max-width: none;
    }

    .text-page {
        padding-top: 7rem;
    }
}
