/* EDQ standalone document alignment with the main RoboPol visual system. */
:root {
    --edq-bg: var(--rp-bg, #060b10);
    --edq-surface: var(--rp-surface, rgba(12, 22, 30, 0.86));
    --edq-surface-strong: var(--rp-surface-strong, rgba(17, 31, 40, 0.94));
    --edq-text: var(--rp-text, #f3f8f8);
    --edq-muted: var(--rp-muted, #9fb2b4);
    --edq-teal: var(--rp-teal, #19c8c1);
    --edq-orange: var(--rp-orange, #f49a35);
    --edq-line: var(--rp-line, rgba(155, 228, 223, 0.16));
    --edq-line-strong: var(--rp-line-strong, rgba(42, 220, 211, 0.34));
    --edq-wide: var(--rp-wide, 1500px);
    --edq-radius: var(--rp-radius, 8px);
}

html {
    background: var(--edq-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--edq-bg) !important;
    background-image: none !important;
    color: var(--edq-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.75;
    letter-spacing: 0;
    overflow-x: hidden;
}

body::before,
.cosmos-bg,
.cosmos-overlay {
    display: none !important;
    content: none !important;
}

.container,
.content-wrapper {
    width: min(calc(100% - 48px), var(--edq-wide));
    max-width: var(--edq-wide);
    margin: 0 auto !important;
    padding: clamp(7rem, 11vh, 9rem) 0 clamp(4rem, 7vw, 6rem) !important;
    position: relative;
    z-index: 1;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.content-wrapper,
.intro-card,
.postulate-item,
.math-box,
.highlight-box {
    animation: none !important;
    opacity: 1 !important;
}

header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-align: left;
    transform: none !important;
}

h1 {
    max-width: none;
    margin: 0 0 clamp(2.2rem, 4vw, 3.4rem) !important;
    padding: 0 0 clamp(1.2rem, 2vw, 1.8rem) !important;
    border-bottom: 1px solid var(--edq-line) !important;
    background: none !important;
    color: var(--edq-text) !important;
    -webkit-text-fill-color: currentColor !important;
    text-align: left !important;
    text-transform: none !important;
    text-shadow: none !important;
    letter-spacing: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: clamp(2.6rem, 5vw, 5.4rem) !important;
    font-weight: 800 !important;
    line-height: 0.98 !important;
}

h2 {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: clamp(3.2rem, 5vw, 5rem) 0 clamp(1.2rem, 2vw, 1.8rem) !important;
    color: var(--edq-text) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: clamp(1.55rem, 2.3vw, 2.25rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

h2::before {
    content: '';
    flex: 0 0 2px;
    width: 2px;
    height: 34px;
    background: var(--edq-orange);
    box-shadow: none;
}

h3,
.point-title {
    color: var(--edq-teal) !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

p,
li,
.legend-text {
    max-width: none;
    margin: 0 0 1rem;
    color: var(--edq-muted) !important;
    font-size: clamp(1rem, 1.25vw, 1.12rem) !important;
    line-height: 1.78 !important;
}

a {
    color: var(--edq-teal);
}

a:hover {
    color: var(--edq-text);
}

.content-wrapper a[style],
.container a[style] {
    color: var(--edq-teal) !important;
}

strong,
em {
    color: var(--edq-text) !important;
}

ul {
    margin: 1rem 0 0;
    padding-left: 1.4rem !important;
    list-style: disc;
}

ul li {
    margin-bottom: 0.75rem;
}

.language-switcher {
    position: static !important;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    margin: 0 0 clamp(2rem, 4vw, 3rem) !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    text-align: right;
}

.language-switcher span {
    display: none;
}

.language-switcher a,
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 38px;
    margin: 0 !important;
    padding: 0.45rem 0.75rem !important;
    border: 1px solid rgba(25, 200, 193, 0.22) !important;
    border-radius: 6px !important;
    background: rgba(25, 200, 193, 0.08) !important;
    color: rgba(243, 248, 248, 0.84) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.language-switcher a:hover,
.lang-btn:hover,
.language-switcher a.active,
.lang-btn.active {
    border-color: var(--edq-line-strong) !important;
    background: rgba(25, 200, 193, 0.16) !important;
    color: var(--edq-text) !important;
}

.intro-card,
.postulate-item,
.math-box,
.highlight-box {
    width: 100%;
    margin: clamp(1.4rem, 2.6vw, 2.4rem) 0 !important;
    padding: clamp(1.25rem, 2.2vw, 2rem) !important;
    border: 1px solid var(--edq-line) !important;
    border-radius: var(--edq-radius) !important;
    background: var(--edq-surface) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

.intro-card::before,
.postulate-item::after {
    display: none !important;
    content: none !important;
}

.math-box {
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    color: var(--edq-text) !important;
    font-size: clamp(0.92rem, 1.1vw, 1rem) !important;
    word-break: normal !important;
}

.math-box[style] {
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
}

.highlight-box h3 {
    margin-top: 0 !important;
}

.postulate-list {
    display: grid;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin: 0;
    padding: 0 !important;
    list-style: none;
}

.postulate-list li::before {
    content: none !important;
}

.postulate-item {
    transform: none !important;
}

.postulate-item:hover {
    transform: none !important;
    border-color: var(--edq-line-strong) !important;
    background: var(--edq-surface-strong) !important;
}

.badge {
    border-radius: 6px !important;
    border-color: rgba(25, 200, 193, 0.22) !important;
    background: rgba(25, 200, 193, 0.08) !important;
    color: var(--edq-text) !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: 0 !important;
}

code {
    border: 1px solid rgba(25, 200, 193, 0.22) !important;
    border-radius: 6px !important;
    background: rgba(25, 200, 193, 0.08) !important;
    color: var(--edq-text) !important;
}

.mjx-container {
    max-width: 100%;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .container,
    .content-wrapper {
        width: min(calc(100% - 28px), var(--edq-wide));
        padding-top: 5.5rem !important;
    }

    h1 {
        font-size: clamp(2.2rem, 12vw, 3.3rem) !important;
    }

    h2 {
        align-items: flex-start;
        font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
    }

    .language-switcher {
        justify-content: flex-start;
    }
}
