* {
    box-sizing: border-box;
}

:root {
    --background: #0b1117;
    --background-light: #111922;
    --background-footer: #080c10;

    --text: #f4f6f8;
    --text-muted: #c7cdd4;

    --accent: #f7b51b;
    --accent-orange: #ff7a18;

    --border: rgba(255, 255, 255, 0.12);
    --container-width: 900px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;

    color: var(--text);
    background: var(--background);
}

a {
    color: inherit;
}

.container {
    width: min(var(--container-width), calc(100% - 40px));
    margin: 0 auto;
}

/* Hero-Bereich */

.hero {
    position: relative;

    min-height: 510px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 25% 20%,
            rgba(247, 181, 27, 0.16),
            transparent 35%
        ),
        linear-gradient(
            120deg,
            #28333d,
            #111820 55%,
            #1b242c
        );
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background-image: url("/assets/img/hero.png");
    background-size: cover;
    background-position: center;

    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            rgba(4, 9, 14, 0.40),
            rgba(4, 9, 14, 0.72)
        );
}

.hero-content {
    position: relative;
    z-index: 1;

    width: min(920px, calc(100% - 40px));
    padding: 60px 0;

    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;

    color: var(--accent);

    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.hero h1 {
    margin: 0;

    font-size: clamp(3rem, 8vw, 5.4rem);
    line-height: 1.03;
    letter-spacing: 0.02em;
}

.hero-text {
    max-width: 760px;

    margin: 26px auto 28px;

    color: #ffffff;
    font-size: 1.02rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 12px;
}

.button {
    min-width: 185px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 22px;

    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 12px;

    color: #ffffff;
    background: rgba(9, 15, 21, 0.58);

    font-weight: 700;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);

    background: rgba(255, 255, 255, 0.10);
    border-color: #ffffff;
}

.button-primary {
    color: #121212;

    border-color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-orange)
        );
}

.button-primary:hover {
    background:
        linear-gradient(
            90deg,
            #ffc83d,
            #ff8c38
        );
}

.button.disabled {
    cursor: not-allowed;
}

/* Inhaltsbereiche */

.content-section {
    padding: 68px 0;
}

.section-dark {
    background:
        radial-gradient(
            circle at 0 0,
            rgba(120, 70, 45, 0.10),
            transparent 35%
        ),
        var(--background);
}

.section-light {
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(160, 130, 45, 0.08),
            transparent 32%
        ),
        var(--background-light);
}

.content-section h2 {
    margin: 0 0 20px;

    font-size: clamp(1.9rem, 4vw, 2.5rem);
    line-height: 1.15;
}

.content-section p,
.content-section li {
    color: var(--text-muted);
}

.content-section p {
    margin-top: 0;
}

.content-section p + p {
    margin-top: 18px;
}

.content-section ul {
    margin: 0;
    padding-left: 23px;
}

.content-section li + li {
    margin-top: 7px;
}

/* Footer */

footer {
    border-top: 1px solid var(--border);
    background: var(--background-footer);
}

.footer-content {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-content nav {
    display: flex;
    flex-wrap: wrap;

    gap: 18px;
}

.footer-content a {
    text-decoration: none;
}

.footer-content a:hover {
    color: #ffffff;
}

/* Responsive Design */

@media (max-width: 760px) {
    .hero {
        min-height: 570px;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 13vw, 4rem);
    }

    .button {
        width: min(100%, 320px);
    }

    .footer-content {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;

        padding: 22px 0;
    }
}

@media (max-width: 480px) {
    .container,
    .hero-content {
        width: min(100% - 28px, var(--container-width));
    }

    .hero-content {
        padding: 48px 0;
    }

    .hero-text {
        font-size: 0.96rem;
    }

    .content-section {
        padding: 52px 0;
    }

    .footer-content nav {
        gap: 10px 16px;
    }
}

/* Unterseiten und Markdown-Inhalte */

.page-header {
    position: sticky;
    top: 0;
    z-index: 100;

    border-bottom: 1px solid var(--border);

    background: rgba(8, 12, 16, 0.94);
    backdrop-filter: blur(12px);
}

.page-header-content {
    min-height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.page-brand {
    color: var(--accent);

    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-decoration: none;
    white-space: nowrap;
}

.page-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 20px;
}

.page-navigation a {
    color: var(--text-muted);

    font-size: 0.94rem;
    text-decoration: none;

    transition: color 0.2s ease;
}

.page-navigation a:hover,
.page-navigation a.active {
    color: #ffffff;
}

.markdown-main {
    min-height: calc(100vh - 156px);
    padding: 52px 0 80px;
}

.markdown-layout {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;

    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);

    gap: 48px;
    align-items: start;
}

.markdown-sidebar {
    position: sticky;
    top: 105px;

    max-height: calc(100vh - 130px);
    overflow-y: auto;

    padding: 22px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: var(--background-light);
}

.markdown-sidebar h2 {
    margin: 0 0 16px;

    font-size: 1.15rem;
}

.markdown-sidebar nav {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.markdown-sidebar a {
    color: var(--text-muted);

    font-size: 0.91rem;
    line-height: 1.4;
    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.markdown-sidebar a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.markdown-sidebar .navigation-subitem {
    padding-left: 15px;
    font-size: 0.84rem;
}

.markdown-loading,
.markdown-error {
    color: var(--text-muted);
}

.markdown-article {
    min-width: 0;
}

.markdown-title {
    margin-bottom: 42px;
}

.markdown-title h1 {
    margin: 0;

    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1.05;
}

.markdown-title > p:last-child {
    margin-top: 16px;
    color: var(--text-muted);
}

.markdown-content {
    padding: 34px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(247, 181, 27, 0.05),
            transparent 30%
        ),
        var(--background-light);
}

.markdown-content > :first-child {
    margin-top: 0;
}

.markdown-content > :last-child {
    margin-bottom: 0;
}

.markdown-content h1 {
    display: none;
}

.markdown-content h2 {
    margin: 56px 0 22px;
    padding-bottom: 14px;

    border-bottom: 1px solid var(--border);

    font-size: clamp(1.65rem, 4vw, 2.15rem);
    line-height: 1.2;
}

.markdown-content h3 {
    margin: 34px 0 12px;

    color: #ffffff;

    font-size: clamp(1.2rem, 3vw, 1.45rem);
    line-height: 1.3;
}

.markdown-content p,
.markdown-content li {
    color: var(--text-muted);
}

.markdown-content p {
    margin: 0 0 18px;
}

.markdown-content ul {
    margin: 0 0 22px;
    padding-left: 24px;
}

.markdown-content li + li {
    margin-top: 7px;
}

.markdown-content strong {
    color: #ffffff;
}

.markdown-content em {
    color: #e4e8ec;
}

.markdown-content code {
    padding: 2px 6px;

    border-radius: 5px;

    color: var(--accent);
    background: rgba(255, 255, 255, 0.08);

    font-family: Consolas, Monaco, monospace;
}

.markdown-content a {
    color: var(--accent);
}

@media (max-width: 900px) {
    .page-header-content {
        align-items: flex-start;
        flex-direction: column;

        padding: 17px 0;
    }

    .page-navigation {
        justify-content: flex-start;
        gap: 10px 18px;
    }

    .markdown-layout {
        grid-template-columns: 1fr;
    }

    .markdown-sidebar {
        position: static;

        max-height: none;
    }
}

@media (max-width: 560px) {
    .markdown-layout {
        width: min(100% - 28px, 1200px);
    }

    .markdown-main {
        padding: 38px 0 58px;
    }

    .markdown-content {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .markdown-title {
        margin-bottom: 30px;
    }
}

/* Globale Timeless-Vibes-Branding-Karte */

.site-brand-card {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 245px;
    padding: 13px 16px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;

    color: #ffffff;
    background: rgba(8, 13, 19, 0.94);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    text-decoration: none;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.site-brand-card:hover {
    transform: translateY(-2px);

    border-color: rgba(247, 181, 27, 0.48);

    box-shadow:
        0 16px 42px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(247, 181, 27, 0.08);
}

.site-brand-logo {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    border-radius: 13px;

    object-fit: cover;

    background:
        linear-gradient(
            135deg,
            rgba(247, 181, 27, 0.18),
            rgba(255, 122, 24, 0.08)
        );

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.site-brand-text {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.site-brand-name {
    color: #ffffff;

    font-size: 1.05rem;
    line-height: 1.08;
    letter-spacing: 0.01em;
}

.site-brand-host {
    margin-top: 6px;

    color: #8eb8ed;

    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

/* Platz für die Branding-Karte auf Unterseiten */

.markdown-page .page-header-content {
    padding-left: 285px;
}

@media (max-width: 1050px) {
    .markdown-page .page-header-content {
        padding-top: 105px;
        padding-left: 0;
    }
}

@media (max-width: 560px) {
    .site-brand-card {
        position: absolute;
        top: 12px;
        left: 14px;

        width: calc(100% - 28px);
        min-width: 0;

        padding: 11px 13px;
    }

    .site-brand-logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .site-brand-name {
        font-size: 0.98rem;
    }

    .markdown-page .page-header-content {
        padding-top: 100px;
    }

    .hero-content {
        padding-top: 145px;
    }
}

/* Regelwerk-Schnellnavigation */

.rules-quicknav {
    padding: 14px;

    border-color: rgba(255, 255, 255, 0.11);
    border-radius: 19px;

    background: #090f15;
}

.quicknav-heading {
    display: flex;
    flex-direction: column;

    margin-bottom: 10px;

    line-height: 1.2;
}

.quicknav-heading span {
    color: var(--accent);

    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.quicknav-heading strong {
    margin-top: 2px;

    color: #ffffff;

    font-size: 0.91rem;
}

.quicknav-top {
    width: 100%;

    margin-bottom: 11px;
    padding: 10px 12px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;

    color: #9ba8bd;
    background: #131a22;

    font: inherit;
    font-size: 0.83rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.quicknav-top:hover {
    color: #ffffff;
    border-color: rgba(247, 181, 27, 0.45);
    background: #18212b;
}

.quicknav-search-label {
    display: block;
}

.quicknav-search-label input {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    outline: none;

    color: #ffffff;
    background: #131a22;

    font: inherit;
    font-size: 0.82rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.quicknav-search-label input::placeholder {
    color: #94a0b3;
}

.quicknav-search-label input:focus {
    border-color: rgba(247, 181, 27, 0.65);

    box-shadow:
        0 0 0 3px rgba(247, 181, 27, 0.09);
}

.quicknav-search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 10px;
}

.quicknav-search-info strong {
    color: #9ba8bd;

    font-size: 0.79rem;
}

.quicknav-search-info button {
    padding: 8px 10px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;

    color: #ffffff;
    background: #141c25;

    font: inherit;
    font-size: 0.75rem;
    font-weight: 800;

    cursor: pointer;
}

.quicknav-search-info button:hover:not(:disabled) {
    border-color: rgba(247, 181, 27, 0.45);
    background: #1a2430;
}

.quicknav-search-info button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.quicknav-divider {
    height: 1px;

    margin: 13px 0;

    background: rgba(255, 255, 255, 0.09);
}

.rules-quicknav #markdown-navigation {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.rules-quicknav .quicknav-category {
    display: flex;
    align-items: center;

    min-height: 41px;
    padding: 9px 11px;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;

    color: #9ba8bd;
    background: #131a22;

    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.rules-quicknav .quicknav-category:hover {
    color: #ffffff;
    transform: translateX(0);

    border-color: rgba(247, 181, 27, 0.4);
    background: #18212b;
}

.rules-quicknav .quicknav-category.active {
    color: #111111;

    border-color: #ffc74a;

    background:
        linear-gradient(
            90deg,
            #ffc646,
            #ff9f2e
        );

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.20),
        0 5px 16px rgba(255, 159, 46, 0.13);
}

.rules-search-match {
    border-radius: 5px;

    background: rgba(247, 181, 27, 0.09);

    outline: 1px solid rgba(247, 181, 27, 0.22);
    outline-offset: 4px;
}

.rules-search-match-active {
    background: rgba(247, 181, 27, 0.19);

    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

.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;
}

@media (max-width: 900px) {
    .rules-quicknav {
        max-height: none;
    }
}

/* TIMELESS FOOTER UND MOBILE START */

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(7, 8, 12, 0.96);
}

.footer-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.footer-brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.footer-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.footer-brand strong {
    color: #ffffff;
    font-size: 0.95rem;
}

.footer-brand small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
}

.footer-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 160ms ease;
}

.footer-navigation a:hover,
.footer-navigation a:focus-visible {
    color: #ffffff;
}

.footer-copyright {
    justify-self: end;
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Tablet */

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 38px 0;
        text-align: center;
        gap: 24px;
    }

    .footer-brand {
        justify-self: center;
    }

    .footer-copyright {
        justify-self: center;
    }
}

/* Smartphone */

@media (max-width: 768px) {
    body {
        min-width: 0;
    }

    main,
    section,
    article,
    header,
    footer {
        max-width: 100%;
    }

    .container,
    .content,
    .content-wrapper,
    .page-container,
    .hero-content,
    .footer-inner {
        width: min(100% - 32px, 1180px);
    }

    .hero {
        min-height: auto;
        padding: 72px 0 56px;
        background-position: center;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 13vw, 4rem);
        line-height: 0.95;
        overflow-wrap: anywhere;
    }

    .hero p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .button-group,
    .buttons,
    .hero-buttons,
    .actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .button-group .button,
    .buttons .button,
    .hero-buttons .button,
    .actions .button {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        text-align: center;
    }

    .brand-card,
    .site-brand,
    .brand {
        max-width: calc(100% - 24px);
    }

    .footer-navigation {
        flex-direction: column;
        gap: 14px;
    }

    .footer-navigation a {
        display: block;
        width: 100%;
        padding: 4px 12px;
    }

    .footer-brand img {
        width: 44px;
        height: 44px;
    }

    .footer-copyright {
        white-space: normal;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    pre,
    code {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Sehr kleine Smartphones */

@media (max-width: 420px) {
    .container,
    .content,
    .content-wrapper,
    .page-container,
    .hero-content,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding-top: 56px;
    }

    .hero h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }
}

/* TIMELESS FOOTER UND MOBILE ENDE */

/* Regelwerk-Schnellnavigation – Desktop dauerhaft sichtbar */
@media (min-width: 901px) {
    html,
    body {
        overflow-x: clip;
    }

    .markdown-main,
    .markdown-layout {
        overflow: visible;
    }

    .markdown-layout {
        align-items: start;
    }

    .markdown-sidebar.rules-quicknav {
        position: sticky;
        top: 94px;
        align-self: start;
        height: fit-content;
        max-height: calc(100vh - 114px);
        overflow-x: hidden;
        overflow-y: auto;
    }
}
