body {
    /* Set the font to a clean, readable stack */
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* White background */
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    /* Default text color to dark */
    color: #333333;
}

/* --- STICKY BANNER STYLES --- */
.sticky-banner {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 20px;
    text-align: center;
    z-index: 1000;
    box-sizing: border-box;
}

.sticky-banner a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
}

.sticky-banner a:hover {
    color: #0056b3;
    text-decoration: underline;
}

#chat-container {
    width: 90%;
    max-width: 1000px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

/* Chat page specific styles */
body.chat-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

body.chat-page #chat-container {
    height: 80vh;
    margin-top: 0;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.message {
    margin-bottom: 15px;
    padding: 5px 0;
    border-radius: 4px;
    max-width: 100%;
    line-height: 1.5;
    background-color: transparent;
}

.user-message {
    color: #0056b3;
    font-weight: 500;
}

.assistant-message {
    color: #333333;
}

#chat-form {
    display: flex;
    padding: 15px;
    flex-shrink: 0; /* Keep form pinned at bottom */
}

#message-input {
    flex-grow: 1;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333333;
    font-family: inherit;
}

#message-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* --- LINK STYLES --- */
a {
    color: #007bff;
    text-decoration: underline;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.message a {
    color: #007bff;
    text-decoration: underline;
}

.message a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* --- LOGIN FORM STYLES --- */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 200px;
}

#login-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

#email-input {
    flex-grow: 1;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333333;
    font-family: inherit;
}

#email-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#login-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #ffffff;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
}

#login-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* --- HOMEPAGE STYLES --- */
.homepage-form-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    min-height: 200px;
}

/* --- NEWSLETTER STYLES --- */
.newsletter-section {
    width: 100%;
    margin-bottom: 10px;
}

.newsletter-section h1 {
    color: #333333;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: bold;
}

.newsletter-section h4 {
    color: #666666;
    font-size: 18px;
    margin-top: -5px;
    margin-bottom: 20px;
    font-weight: normal;
}

.newsletter-overview {
    margin-bottom: 30px;
}

.newsletter-overview p {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.overview-text {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.last-updated {
    color: #666666;
    font-size: 12px;
    font-style: italic;
}

.overview-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.expand-button {
    background: none;
    border: none;
    color: #007bff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-left: 5px;
    font-family: inherit;
}

.expand-button:hover {
    color: #0056b3;
}

.topics-section {
    width: 100%;
}

.topic {
    margin-bottom: 40px;
    border-left: 2px solid #007bff;
    padding-left: 20px;
}

.topic h3 {
    color: #333333;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: bold;
}

.topic-summary {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.opinions {
    margin-left: 20px;
}

.opinion {
    margin-bottom: 15px;
    padding-left: 15px;
}

.opinion-text {
    color: #555555;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.opinion-source {
    color: #666666;
    font-size: 12px;
    font-style: italic;
    margin: 0;
}

/* --- NEWSLETTER ARCHIVE STYLES --- */
.newsletter-item {
    width: 100%;
    margin-bottom: 20px;
    padding: 15px 0;
}

.newsletter-name {
    color: #666666;
    font-size: 12px;
    margin-bottom: 5px;
}

.newsletter-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.time-ago {
    color: #666666;
    font-size: 12px;
}

span.time-ago {
    margin-bottom: 4px;
}

.newsletter-content {
    border-left: 2px solid #007bff;
    padding-left: 20px;
    margin-bottom: 0;
}

.newsletter-subject {
    color: #333333;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.newsletter-summary {
    margin-bottom: 20px;
}

.newsletter-summary p {
    color: #555555;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.newsletter-topics {
    margin-bottom: 15px;
}

.newsletter-topics h5 {
    color: #333333;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: bold;
}

.newsletter-topics p {
    color: #555555;
    font-size: 14px;
    margin: 0;
}

.newsletter-topics ul {
    color: #555555;
    font-size: 14px;
    margin: 0;
    padding-left: 20px;
}

.newsletter-topics li {
    margin-bottom: 5px;
}

.newsletter-separator {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 15px 0;
}

.no-newsletters {
    text-align: center;
    padding: 40px 20px;
}

.no-newsletters p {
    color: #666666;
    font-size: 16px;
}

.footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.footer-info p {
    color: #666666;
    font-size: 14px;
    text-align: center;
}

/* --- POST PAGE STYLES (1636 Forum Style) --- */
.post-page {
    font-family: 'Lato', sans-serif;
    background-color: #ffffff;
    color: #333;
    margin: 0;
    padding: 0;
}

.post-container {
    margin-top: 100px;
    font-family: 'Lato', sans-serif;
}

.post-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.post-title {
    font-size: 2.5em;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.2;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.post-meta-item {
    margin-right: 20px;
}

.post-body {
    font-size: 1.1em;
    color: #333;
    word-wrap: break-word;
    line-height: 1.6;
}

.post-body h1 {
    font-size: 2em;
    font-weight: 600;
    margin: 30px 0 20px 0;
    color: #333;
}

.post-body h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 25px 0 15px 0;
    color: #333;
}

.post-body h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #333;
}

.post-body h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 15px 0 8px 0;
    color: #333;
}

.post-body p {
    margin-bottom: 15px;
}

.post-body a {
    color: #007bff;
    text-decoration: underline;
}

.post-body a:hover {
    color: #0056b3;
}

.post-body b, .post-body strong {
    font-weight: 600;
}

.post-body em {
    font-style: italic;
}

.error-message {
    text-align: center;
    color: #666;
    font-size: 1.2em;
    margin-top: 50px;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
}

.back-link:hover {
    text-decoration: underline;
    color: #007bff;
}

@media (max-width: 600px) {
    .post-container {
        margin-top: 50px;
    }
    
    .post-title {
        font-size: 2em;
    }
    
    .post-meta-item {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* --- HOMEPAGE CONTENT STYLES --- */
.homepage-content {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.homepage-content ul {
    list-style: none;
}

.content-section {
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title {
    font-weight: 500;
    color: crimson;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.special-reports .report-item {
    margin-bottom: 15px;
}

.report-item b a {
    color: #007bff;
    text-decoration: none;
}

.report-item b a:hover {
    text-decoration: underline;
}

.newsletter-signup {
    background: #f5f5f5;
    padding: 50px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.notable-events {
    padding-bottom: 25px;
    margin-bottom: 40px;
}

.notable-item {
    margin-bottom: 1px;
    margin-left: 10px;
}

.testimonials {
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 0;
    margin: 30px 0;
}

.testimonial {
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    font-weight: bold;
    font-style: normal;
}

.about-nav {
    margin-left: -40px;
}

.about-nav li {
    margin-bottom: 5px;
}

.donate-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #A51C30;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.donate-button:hover {
    background-color: #8a1729;
    color: white;
    text-decoration: none;
}

.mission-list {
    list-style: none;
    padding-left: 0;
}

.mission-list li {
    margin-bottom: 20px;
}

.approach-item {
    margin-bottom: 25px;
}

.approach-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.background-box {
    background: #f5f5f5;
    padding: 50px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.involvement-list {
    padding-left: 20px;
}

.involvement-list li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .homepage-content {
        padding: 15px;
    }
    
    .newsletter-signup,
    .background-box {
        padding: 30px 20px;
    }
}

/* --- NEWSLETTERS INDEX PAGE STYLES --- */
.newsletters-list {
    width: 100%;
}

.newsletter-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.newsletter-item:last-child {
    border-bottom: none;
}

.newsletter-title {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 500;
    line-height: 1.3;
}

.newsletter-title a {
    color: #333;
    text-decoration: none;
}

.newsletter-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.newsletter-meta {
    font-size: 0.9em;
    color: #666;
}

.newsletter-date {
    font-weight: 500;
    margin-right: 15px;
}

.newsletter-author {
    margin-right: 15px;
}

.newsletter-school {
    font-style: italic;
}

.no-newsletters {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}
