:root {
    --romani-green: #5f7f00;
    --romani-green-dark: #2f3f08;
    --romani-orange: #f2a000;
    --romani-ink: #202414;
    --romani-paper: #f7f1df;
    --romani-line: rgba(47, 63, 8, 0.18);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background:
        linear-gradient(90deg, rgba(247, 241, 223, 0.96) 0%, rgba(247, 241, 223, 0.9) 55%, rgba(247, 241, 223, 0.68) 100%),
        repeating-linear-gradient(105deg, transparent 0 20px, rgba(95, 127, 0, 0.06) 20px 22px),
        linear-gradient(135deg, #f7f1df 0%, #e9e2c8 45%, #a9b86b 100%);
    color: var(--romani-ink);
}

.legal-page {
    padding: 3rem 7vw;
}

.legal-document {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--romani-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 45px rgba(47, 63, 8, 0.12);
}

.legal-logo {
    display: inline-flex;
    margin-bottom: 2rem;
}

.legal-logo img {
    width: min(280px, 100%);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(47, 63, 8, 0.12));
}

.legal-kicker {
    margin: 0 0 0.45rem;
    color: #5d6545;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--romani-green-dark);
}

h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

h2 {
    margin: 1.8rem 0 0.65rem;
    font-size: 1.45rem;
}

p,
li {
    color: #3f4630;
    line-height: 1.65;
}

.legal-intro {
    max-width: 680px;
    color: #4f5537;
    font-size: 1.05rem;
}

.legal-warning {
    margin: 1.4rem 0;
    padding: 0.85rem 1rem;
    border-left: 5px solid var(--romani-orange);
    background: rgba(242, 160, 0, 0.14);
    color: #5f450d;
    font-weight: 700;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.72);
}

.legal-table th,
.legal-table td {
    padding: 0.75rem;
    border: 1px solid rgba(47, 63, 8, 0.14);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: #eef0e5;
    color: var(--romani-green-dark);
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(47, 63, 8, 0.14);
}

.legal-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(47, 63, 8, 0.2);
    border-radius: 4px;
    color: var(--romani-green-dark);
    text-decoration: none;
    background: rgba(247, 241, 223, 0.58);
    font-weight: 700;
}

.legal-actions a:hover {
    border-color: var(--romani-green);
    background: rgba(95, 127, 0, 0.1);
    color: var(--romani-green-dark);
}

.pdf-viewer-page {
    min-height: 100vh;
}

.pdf-viewer-document {
    width: min(1180px, 100%);
}

.pdf-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.legal-view-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(47, 63, 8, 0.2);
    border-radius: 4px;
    color: var(--romani-green-dark);
    text-decoration: none;
    background: rgba(247, 241, 223, 0.58);
    font-weight: 700;
    white-space: nowrap;
}

.legal-view-link:hover {
    border-color: var(--romani-green);
    background: rgba(95, 127, 0, 0.1);
    color: var(--romani-green-dark);
}

.pdf-viewer-frame {
    width: 100%;
    height: min(78vh, 900px);
    min-height: 560px;
    margin-top: 1rem;
    border: 1px solid rgba(47, 63, 8, 0.18);
    border-radius: 6px;
    background: #fff;
}

.pdf-viewer-fallback {
    margin: 0.75rem 0 0;
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 1.25rem;
    }

    .pdf-viewer-header {
        display: block;
    }

    .legal-view-link {
        margin-top: 0.75rem;
    }

    .pdf-viewer-frame {
        min-height: 520px;
    }
}
