:root {
    --primary: #9B2154;
    --primary-dark: #7a1a43;
    --primary-light: #c42a6b;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --font-display: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-pattern::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background:
        radial-gradient(circle at 20% 20%, rgba(155, 33, 84, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(155, 33, 84, 0.1) 0%, transparent 40%);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
}

nav {
    position: relative;
    z-index: 10;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-back {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-back:hover {
    color: var(--primary-light);
}

main {
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.legal-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 1rem;
}

.legal-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.legal-content {
    background: var(--bg-card);
    border: 1px solid rgba(155, 33, 84, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
}

.legal-content h2:first-child,
.legal-content > *:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content strong {
    color: var(--text);
    font-weight: 600;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 1.25rem 0;
    padding: 0;
    list-style: none;
}

.legal-content li {
    position: relative;
    color: var(--text-muted);
    font-size: 1rem;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.legal-content ul > li::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.7rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-light);
    opacity: 0.85;
}

.legal-content ol {
    counter-reset: legal-counter;
}

.legal-content ol > li {
    counter-increment: legal-counter;
}

.legal-content ol > li::before {
    content: counter(legal-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-light);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    width: 1.5rem;
}

.legal-content a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: #e84393;
    text-decoration: underline;
}

.legal-content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(155, 33, 84, 0.4), transparent);
    margin: 2.25rem 0 1.5rem;
}

.legal-table-wrap {
    margin: 0 0 1.5rem;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 480px;
}

.legal-content thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(155, 33, 84, 0.15);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 1px solid rgba(155, 33, 84, 0.25);
}

.legal-content tbody td {
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

.legal-content tbody tr:last-child td {
    border-bottom: none;
}

.legal-content tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.legal-content tbody td code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary-light);
    background: rgba(155, 33, 84, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.legal-intro {
    color: var(--text) !important;
    font-size: 1.05rem !important;
    line-height: 1.7;
    margin-bottom: 1.5rem !important;
}

.legal-footnote {
    color: var(--text-muted);
    font-size: 0.85rem !important;
    font-style: italic;
    text-align: center;
    line-height: 1.6;
}

.placeholder-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    background: rgba(155, 33, 84, 0.12);
    border: 1px solid rgba(155, 33, 84, 0.3);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.placeholder-notice-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--primary-light);
}

.placeholder-notice p {
    color: var(--text);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.55;
}

footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p + p {
    margin-top: 0.35rem;
}

@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    main {
        padding: 2rem 1rem 3rem;
    }

    .legal-content {
        padding: 1.75rem 1.25rem;
    }
}
