:root {
    --text-primary: #111;
    --text-secondary: #333;
    --bg-main: #f0f2f5;
    --bg-surface: #fff;
    --border-color: #ddd;
    --footer-bg: #333;
    --footer-text: #f9f9f9;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem; /* Offset for header when jumping to sections */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: var(--bg-main);
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #fff;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
}

.main-content {
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.guideline-links {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.guideline-links li {
    margin-bottom: 0.5rem;
}

.guideline-links a {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
}

.guideline-links a:hover {
    background-color: var(--bg-main);
    color: var(--text-primary);
}

/* Table of Contents for policy pages */
.toc {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
}

.toc h3 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li a {
    text-decoration: none;
    color: var(--text-secondary);
}

.toc li a:hover {
    text-decoration: underline;
}

h1, h2 {
    color: var(--text-primary);
}

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    margin-top: auto; /* Pushes footer to the bottom */
}

/* Section separator for policy pages */
.container h2:not(:first-of-type) {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.footer-nav a {
    color: var(--footer-text);
    text-decoration: none;
}

.footer-nav a:not(:last-child)::after {
    content: "|";
    margin: 0 10px;
    color: var(--footer-text);
}

.footer-nav a:hover {
    text-decoration: underline;
}

.utility-button {
    float: right;
    margin-left: 1rem;
    background-color: var(--bg-main);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

.utility-button:hover {
    background-color: #e2e6ea;
    border-color: #c8ced3;
}

@media print {
    body { background-color: #fff; }
    .header, .footer, .utility-button { display: none; }
    .main-content { max-width: 100%; padding: 0; }
    .container {
        box-shadow: none;
        border: none;
    }
}