:root {
    --primary: #8B1E41;
    --primary-light: #b02a56;
    --bg-dark: #0A0A0A;
    --bg-panel: #121212;
    --text-main: #FFFFFF;
    --text-muted: #999999;
    --text-dim: #666666;
    --border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: #DDDDDD;
    line-height: 1.7;
    background-image:
        radial-gradient(circle at 10% 0%, rgba(139, 30, 65, 0.12), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(139, 30, 65, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* ---- Top bar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-icon::after {
    content: '';
    width: 12px;
    height: 12px;
    background-color: #fff;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--text-main);
    border-color: var(--primary);
    background: rgba(139, 30, 65, 0.1);
}

/* ---- Document layout ---- */
.doc-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 24px 100px;
}

.doc-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.doc-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    margin-bottom: 12px;
    background: linear-gradient(to right, #ffffff, #aaaaaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-header .updated {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---- Prose ---- */
.doc-body h2 {
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 44px 0 16px;
    padding-top: 4px;
}

.doc-body h2:first-child {
    margin-top: 0;
}

.doc-body h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 28px 0 12px;
}

.doc-body p {
    margin-bottom: 16px;
    color: #C7C7C7;
    font-size: 0.98rem;
}

.doc-body ul, .doc-body ol {
    margin: 0 0 16px 1.3rem;
    color: #C7C7C7;
}

.doc-body li {
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.doc-body strong {
    color: var(--text-main);
    font-weight: 700;
}

.doc-body a {
    color: #e0839e;
    text-decoration: none;
    border-bottom: 1px solid rgba(224, 131, 158, 0.35);
    transition: border-color 0.2s ease;
}

.doc-body a:hover {
    border-color: #e0839e;
}

.doc-body code {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.88em;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    color: #e0a3b5;
}

/* ---- Tables ---- */
.table-wrap {
    overflow-x: auto;
    margin: 8px 0 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--bg-panel);
}

thead th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(139, 30, 65, 0.12);
    color: var(--text-main);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    color: #C7C7C7;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

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

/* ---- Callout / grievance box ---- */
.callout {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 24px 0;
}

.callout p {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

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

.callout strong {
    color: var(--text-main);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* ---- Footer ---- */
.doc-footer {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 56px;
    text-align: center;
}

.doc-footer .legal-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.doc-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.doc-footer a:hover {
    color: var(--text-main);
}

.doc-footer .copyright {
    color: #555;
    font-size: 0.8rem;
}

@media (max-width: 600px) {
    .doc-header h1 { font-size: 1.9rem; }
    .doc-wrap { padding: 40px 20px 80px; }
    .brand { font-size: 1rem; }
}
