* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 24px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #2b2d2a;
    color: #e5e5e5;
    font-family: 'Roboto', sans-serif;
}

body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/concrete-wall.png");
    content: "";
    opacity: 0.15;
    pointer-events: none;
}

.site-header,
.site-layout {
    position: relative;
    z-index: 1;
}

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px;
    background: rgba(74, 79, 69, 0.96);
    border-bottom: 4px solid #111;
    text-align: center;
}

.site-header h1 {
    width: 100%;
    margin: 0;
    color: #d9d7c8;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 3px;
    text-shadow: 3px 3px 0 #111;
    text-transform: uppercase;
    text-align: center;
}

.site-layout {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 100px);
}

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 260px;
    max-height: 100vh;
    overflow-y: auto;
    padding: 24px 16px;
    background: rgba(58, 63, 54, 0.96);
    border-right: 4px solid #111;
}

.sidebar h2 {
    margin: 0 0 12px;
    color: #d9cf9c;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar li {
    margin: 0 0 6px;
    padding: 0;
}

.sidebar a {
    display: block;
    padding: 10px;
    border-left: 4px solid transparent;
    color: #d7d7d7;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, padding 0.2s ease;
}

.sidebar a:hover,
.sidebar a:focus-visible {
    padding-left: 16px;
    background: #55614f;
    border-left-color: #c2b280;
    outline: none;
}

.sidebar .back-link {
    margin-bottom: 20px;
    color: #d9cf9c;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.doc-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 42px);
    background: rgba(40, 40, 40, 0.92);
    border: 3px solid #555;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.65);
}

.doc-content p,
.doc-content li {
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
}

.doc-content p span,
.doc-content li span {
    max-width: 100%;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.doc-content h3 span {
    color: inherit;
    font: inherit;
}

.doc-content p {
    margin: 0 0 18px;
}

.doc-content > p:first-child {
    margin-bottom: 12px;
    color: #d9cf9c;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.3;
}

.doc-content > p.section-title {
    margin: 48px 0 24px;
    padding: 12px 16px;
    background: rgba(74, 79, 69, 0.75);
    border-bottom: 2px solid #c2b280;
    color: #d9cf9c;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 20px;
}

.doc-content > p:first-child.section-title {
    margin-top: 0;
}

.doc-content > p:nth-child(2) {
    margin-bottom: 28px;
    padding: 14px 18px;
    background: rgba(85, 97, 79, 0.35);
    border-left: 4px solid #c2b280;
    color: #e5e1d2;
}

.doc-content h3 {
    margin: 28px 0 12px;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(194, 178, 128, 0.55);
    background: transparent;
    color: #d9cf9c;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    scroll-margin-top: 20px;
}

.doc-content h3[id^="h."] {
    scroll-margin-top: 20px;
}

.doc-content h3[id="h.db2f04it2vf7"],
.doc-content h3[id="h.5nv8nbfycc2i"] {
    color: #e5e5e5;
}

.doc-content ul {
    margin: 0 0 20px;
    padding-left: 30px;
}

.doc-content li {
    margin-bottom: 8px;
}

.doc-content img {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    margin: 18px auto !important;
    border: 2px solid #555;
    background: #f5f5f5;
}

.doc-content p > span[style*="overflow: hidden"] {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 18px 0 !important;
    overflow: visible !important;
    transform: none !important;
}

.doc-content p[id^="photo-"] {
    scroll-margin-top: 24px;
}

.doc-content table {
    max-width: 100%;
    margin: 18px auto;
    border-collapse: collapse;
    color: #e5e5e5;
}

.doc-content td,
.doc-content th {
    padding: 8px;
    border: 1px solid #666;
}

.doc-content a {
    color: #d9cf9c;
}

.doc-content a:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .site-layout {
        display: block;
    }

    .sidebar {
        position: relative;
        max-height: none;
        padding: 12px;
        border-right: 0;
        border-bottom: 4px solid #111;
    }

    .sidebar h2 {
        text-align: center;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .sidebar li {
        margin: 0;
    }

    .sidebar a {
        padding: 8px;
        border-left: 0;
        border-bottom: 3px solid transparent;
        font-size: 0.9rem;
    }

    .sidebar a:hover,
    .sidebar a:focus-visible {
        padding-left: 8px;
        border-bottom-color: #c2b280;
    }

    .sidebar .back-link {
        margin-bottom: 8px;
        text-align: center;
    }

    .content {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding: 18px 12px;
    }

    .content {
        padding: 12px;
    }

    .doc-content {
        padding: 18px 14px;
    }

    .doc-content p,
    .doc-content li {
        font-size: 0.95rem;
    }

    .doc-content h3 {
        margin-top: 28px;
        font-size: 1.4rem;
    }
}
