:root {
    --oev-lime: #d2e056;
    --oev-black: #111111;
    --bg-body: #f4f4f5;
    --bg-white: #ffffff;
    --text-dark: #111111;
    --text-muted: #6e6e73;
    --border: #eaeaea;
    --radius-sm: 16px;
    --radius-md: 24px;
    --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background: var(--bg-body); color: var(--text-dark); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

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

.page-head {
    padding: 28px 0 16px;
}

.head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--oev-lime);
    color: var(--oev-black);
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.head-link {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-white);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.page-shell {
    display: grid;
    gap: 18px;
    padding: 10px 0 48px;
}

.meta-line {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.meta-line span {
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.04;
    font-weight: 800;
}

.doc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doc-link {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.doc-link.is-active {
    background: var(--oev-black);
    border-color: var(--oev-black);
    color: #fff;
}

.document-card {
    background: var(--bg-white);
    border: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(18px, 2.4vw, 30px);
    overflow: hidden;
}

.document-frame {
    min-height: 420px;
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.document-frame > *:first-child {
    margin-top: 0 !important;
}

.document-frame h1,
.document-frame h2,
.document-frame h3,
.document-frame h4 {
    color: var(--text-dark);
    line-height: 1.14;
    letter-spacing: 0;
}

.document-frame h1 {
    margin: 42px 0 18px !important;
    font-size: clamp(2rem, 4.6vw, 3rem) !important;
}

.document-frame h2 {
    margin: 34px 0 16px !important;
    font-size: clamp(1.45rem, 3vw, 2.1rem) !important;
}

.document-frame h3 {
    margin: 28px 0 14px !important;
    font-size: clamp(1.18rem, 2.2vw, 1.5rem) !important;
}

.document-frame h4 {
    margin: 22px 0 12px !important;
    font-size: 1.08rem !important;
}

.document-frame p,
.document-frame li,
.document-frame td,
.document-frame th {
    line-height: 1.72 !important;
}

.document-frame p,
.document-frame ul,
.document-frame ol,
.document-frame table,
.document-frame blockquote {
    margin: 0 0 16px !important;
}

.document-frame ul,
.document-frame ol {
    padding-left: 28px !important;
}

.document-frame li + li {
    margin-top: 4px;
}

.document-frame strong {
    color: var(--text-dark) !important;
}

.document-frame table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.document-frame th,
.document-frame td {
    padding: 10px 12px !important;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.document-frame hr {
    margin: 28px 0 !important;
    border: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.loading-state,
.error-state {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.error-state strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 6px;
}

@media (max-width: 720px) {
    .container {
        width: min(1240px, calc(100% - 24px));
    }

    .page-head {
        padding-top: 20px;
    }

    .head-actions,
    .head-link {
        width: 100%;
    }

    .head-link {
        justify-content: center;
    }
}
