:root {
    --legal-ink: #101114;
    --legal-ink-soft: rgba(16, 17, 20, 0.7);
    --legal-parchment: #f6f0e7;
    --legal-paper: rgba(255, 255, 255, 0.78);
    --legal-stone: rgba(16, 17, 20, 0.08);
    --legal-accent: #1f5a57;
    --legal-accent-glow: rgba(31, 90, 87, 0.2);
    --legal-shadow: 0 30px 70px rgba(16, 17, 20, 0.16);
}

.legal-page {
    position: relative;
    background: radial-gradient(circle at 15% 10%, rgba(31, 90, 87, 0.18), transparent 55%),
        linear-gradient(180deg, #efe7da 0%, #f6f0e7 40%, #f4ece2 100%);
    color: var(--legal-ink);
    overflow: hidden;
}

.legal-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
            90deg,
            rgba(16, 17, 20, 0.03) 0,
            rgba(16, 17, 20, 0.03) 1px,
            transparent 1px,
            transparent 24px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(16, 17, 20, 0.025) 0,
            rgba(16, 17, 20, 0.025) 1px,
            transparent 1px,
            transparent 24px
        );
    pointer-events: none;
}

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

.legal-hero {
    padding: 5.5rem 0 3rem;
}

.legal-hero-inner {
    display: grid;
    gap: 1.2rem;
    max-width: 56rem;
}

.legal-kicker {
    font-family: "Newsreader", serif;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--legal-accent);
}

.legal-title {
    font-family: "Instrument Serif", "Times New Roman", serif;
    font-size: clamp(2.6rem, 4.4vw, 4.4rem);
    line-height: 1.05;
    margin: 0;
}

.legal-subtitle {
    font-family: "Newsreader", serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--legal-ink-soft);
    max-width: 46rem;
}

.legal-content {
    padding-bottom: 5rem;
}

.legal-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.6rem;
}

.legal-item {
    position: relative;
}

.legal-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.4rem;
    padding: 1.4rem 1.8rem;
    background: var(--legal-paper);
    border: 1px solid var(--legal-stone);
    border-radius: 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--legal-shadow);
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.legal-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 34px 70px rgba(16, 17, 20, 0.18);
}

.legal-index {
    font-family: "Instrument Serif", serif;
    font-size: 1.2rem;
    color: var(--legal-accent);
}

.legal-name {
    font-family: "Newsreader", serif;
    font-size: 1.35rem;
}

.legal-arrow {
    font-size: 1.4rem;
    color: var(--legal-accent);
    transition: transform 0.2s ease;
}

.legal-link:hover .legal-arrow {
    transform: translateX(4px);
}

.legal-divider {
    display: block;
    height: 1px;
    margin: 1.4rem 0 0;
    background: rgba(16, 17, 20, 0.12);
}

.legal-state {
    display: grid;
    place-items: center;
    padding: 3rem 0;
}

.legal-card {
    background: var(--legal-paper);
    border: 1px solid var(--legal-stone);
    border-radius: 24px;
    padding: 2rem 2.4rem;
    text-align: center;
    box-shadow: var(--legal-shadow);
}

.legal-detail {
    background: linear-gradient(180deg, #111316 0%, #1c2220 40%, #f6f0e7 40%, #f6f0e7 100%);
    color: var(--legal-ink);
}

.legal-detail-hero {
    color: #f7f2ea;
    padding: 4.5rem 0 3rem;
    background: radial-gradient(circle at 20% 10%, rgba(31, 90, 87, 0.35), transparent 55%);
}

.legal-detail-hero .legal-subtitle {
    color: rgba(247, 242, 234, 0.82);
}

.legal-breadcrumbs {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-family: "Newsreader", serif;
}

.legal-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.legal-actions {
    margin-top: 1.5rem;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.legal-back:hover {
    background: currentColor;
    color: #101114;
}

.legal-detail-hero .legal-back:hover {
    background: rgba(247, 242, 234, 0.9);
    color: #101114;
}

.legal-body {
    padding: 3rem 0 6rem;
}

.legal-content-card {
    background: #ffffff;
    border-radius: 28px;
    padding: clamp(2rem, 4vw, 3.2rem);
    box-shadow: var(--legal-shadow);
    max-width: 900px;
}

.legal-html h1,
.legal-html h2,
.legal-html h3,
.legal-html h4 {
    font-family: "Instrument Serif", serif;
    margin-top: 2.4rem;
}

.legal-html p,
.legal-html li {
    font-family: "Newsreader", serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--legal-ink-soft);
}

.legal-html ul,
.legal-html ol {
    padding-left: 1.6rem;
}

.legal-html a {
    color: var(--legal-accent);
}

.legal-html blockquote {
    border-left: 3px solid var(--legal-accent);
    padding-left: 1rem;
    margin: 2rem 0;
    color: var(--legal-ink-soft);
}

.legal-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.legal-html th,
.legal-html td {
    border-bottom: 1px solid rgba(16, 17, 20, 0.15);
    padding: 0.8rem;
}

@media (max-width: 900px) {
    .legal-link {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        align-items: flex-start;
    }

    .legal-arrow {
        justify-self: flex-end;
    }
}

@media (max-width: 640px) {
    .legal-hero {
        padding: 4rem 0 2rem;
    }

    .legal-link {
        padding: 1.2rem 1.4rem;
    }

    .legal-title {
        font-size: clamp(2.1rem, 7vw, 3.2rem);
    }
}
