/* CSS Variables */
:root {
    --primary: #8b4513;
    --background: #f7f6f3;
    --secondary: #f0ebe6;
    --text-dark: #3a2c2a;
    --text-muted: #80786f;
    --border: #e0d9d0;
    --white: #fefdfb;
    
    --font-serif: 'Georgia', 'Garamond', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Legal Header */
.legal-header {
    border-bottom: 1px solid var(--border);
    background-color: var(--background);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 56px;
    width: auto;
    display: block;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(58, 44, 42, 0.7);
    transition: color 0.3s ease;
}

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

.back-link span {
    font-size: 1rem;
    display: inline-block;
    margin-right: 0.25rem;
}

/* Main Content */
main {
    background-color: var(--background);
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.prose {
    font-size: 0.875rem;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

.prose h4 {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    margin-left: 0;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.prose strong {
    font-weight: 600;
    color: var(--text-dark);
}

.updated-date {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
}

.highlight-box {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background-color: var(--secondary);
    border-radius: 0.25rem;
    border-left: 4px solid var(--primary);
}

.highlight-box strong {
    color: var(--primary);
}

.key-points {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.key-point {
    background-color: var(--white);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.25rem;
}

.key-point strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.table-of-contents {
    list-style-type: decimal;
    list-style-position: inside;
    margin: 1.5rem 0;
    line-height: 2;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
}

.prose .data-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    background-color: var(--white);
}

.prose th,
.prose td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
    vertical-align: top;
    font-size: 0.95rem;
}

.prose thead th {
    background-color: var(--secondary);
    font-weight: 700;
    color: var(--text-dark);
}

.prose td:last-child,
.prose th:last-child {
    text-align: center;
    white-space: nowrap;
}

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

/* Footer */
.site-footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 3rem;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .footer-brand {
        grid-column: auto;
    }
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 20rem;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.25rem;
    margin-top: 0;
}

.footer-links,
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a,
.footer-contact li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 640px) {
    .prose h1 {
        font-size: 1.75rem;
    }

    .prose h2 {
        font-size: 1.25rem;
    }

    .prose h3 {
        font-size: 1rem;
    }

    main {
        padding: 1.5rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .highlight-box {
        padding: 1rem;
    }

    .table-of-contents {
        padding: 1rem;
    }
}
