:root {
    --bg-color: #FFF5E1;          /* cream (site-wide) */
    --text-color: #3C2F2F;        /* dark brown */
    --nav-bg: #A32D2D;            /* dark red */
    --nav-text: #FFF5E1;          /* cream */
    --link-color: #800000;        /* maroon */
    --mail-bg-color: #B2AC9D;     /* darker cream */
}

/* Global reset and typography */
html, body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Times New Roman", Times, serif;
    font-size: 16px; /* Increased from 14px */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 2.2em; /* Increased from default ~2em */
}

h2 {
    font-size: 1.7em; /* Increased from default ~1.5em */
}

h3 {
    font-size: 1.4em; /* Increased from default ~1.17em */
}

header {
    background-image: url('/static/images/4umheader2560.jpg'); /* Updated to correct image */
    background-size: auto;
    background-position: left top;
    background-repeat: no-repeat;
    height: 105px; /* Retained from previous 1280c.jpg; adjust if different */
    width: 100%;
    display: block;
    margin-bottom: 5px; /* Added tiny space below header */
}

main {
    flex: 1;
    margin-bottom: 2em;
}

nav {
    background-color: var(--bg-color);
    padding: 0.5em 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 40px;  /* aligns with article frame */
}

/* Keep consistent link styling */
nav a {
    color: var(--link-color);
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
    margin-right: 1em;
}

nav a:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}

.nav-link {
    color: var(--link-color);
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-weight: bold; /* Add this so it’s always bold */
}

.nav-link:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}

footer {
    background-color: var(--bg-color);
    color: #000000; /* Changed from --link-color to black */
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.8em;
}

footer {
    background-color: var(--bg-color);
    color: #000000; /* Changed from --link-color to black */
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.8em;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}

.content-wrapper {
    margin-top: 0px;
    width: 95vw;
    max-width: 95%;
    max-height: none;
    height: auto;
    overflow: visible;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.article-link {
    color: var(--link-color);
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
}

.article-link:hover {
    color: var(--nav-bg);
    text-decoration: underline;
}

.mail-nav {
    margin: 1em 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    color: var(--bg-color);  /* cream text */
    background: linear-gradient(to right, #A32D2D, #7D1F1F);
    border: none;
    border-radius: 6px;
    text-decoration: none;  /* <- remove underline */
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    background: linear-gradient(to right, #7D1F1F, #A32D2D);
    color: var(--bg-color); /* keep cream text */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.button-cell {
    text-align: center;
}

.register-button {
    background: linear-gradient(to right, #A32D2D, #7D1F1F);
    color: var(--bg-color); /* Changed to cream #FFF5E1 */
    font-weight: bold;
    padding: 0.5em 1em;
    border: none;
    border-radius: 0.3em;
    cursor: pointer;
}

.register-button:hover {
    background: linear-gradient(to right, #7D1F1F, #A32D2D);
}


/* Unified button style */
.button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    color: var(--bg-color);  /* cream text */
    background: linear-gradient(to right, #A32D2D, #7D1F1F);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    background: linear-gradient(to right, #7D1F1F, #A32D2D); /* gradient change stays */
    color: var(--bg-color);  /* keep cream text */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.article {
    margin-bottom: 2em;
}

.article-header {
    margin-bottom: 1em;
    color: #1A1A1A; /* Darker than --text-color: #3C2F2F */
}

.article-header-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed; /* Changed from auto; forces cells to fit container width */
    color: #1A1A1A;
}

.article-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 1.4em; /* Increased from 1.5em */
    font-weight: bold;
    color: var(--text-color);
    overflow-wrap: break-word; /* Forces long words to break and wrap */
    white-space: normal; /* Overrides nowrap from td:first-child; allows wrapping */
    width: 100%; /* Ensures full cell width for the spanning td */
}

.article-content {
    /* font-family: "Segoe UI", Arial, sans-serif; */
    font-size: 1em;
    line-height: 1.4;
    color: #1A1A1A; /* Darker than --text-color: #3C2F2F */
}

.article-comments {
    margin-top: 0em;
}

.comment {
    margin-bottom: 1em;
    font-size: 1.0em;
    color: #000
}

.comment-meta {
    font-size: 1.0em;
    color: #666;
}

.form-table {
    width: 100%;
    table-layout: fixed;
}

.info-text {
    font-size: 0.8em;
    font-style: italic;
}

.error-message {
    color: red;
    font-size: 0.8em;
    margin-top: 5px;
}

.autocomplete-suggestion {
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.autocomplete-suggestion.selected {
    background-color: #f0f0f0;
}

.autocomplete-suggestion:hover {
    background-color: #f0f0f0;
}

.site-banner {
    text-align: center;
    padding: 1em 0;
    background-color: var(--nav-bg);
    color: var(--nav-text);
}

.site-banner img {
    max-width: 100%;
    height: auto;
    max-height: 100px;
}

.small {
    font-size: 0.8em; /* Assumed size for notices; adjust if different */
    font-style: italic; /* Added for Fair Use Notice */
}

.content-wrapper {
    display: flex;
    align-items: flex-start;
}

/* Sidebar */
.title-bar {
    width: 300px;
    align-self: stretch;        /* ✅ match height of main content area */
    max-height: none;           /* remove the hard 100vh limit */
    overflow-y: visible;        /* no vertical scrollbar */
    margin-left: 20px;
    border-left: 1px solid #ccc;
    padding-left: 10px;
    transition: all 0.3s ease;
}

.title-bar.collapsed {
    width: 40px;
    overflow: hidden;
}

.title-bar-header {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    background: #f2f2f2;
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

.title-bar ul {
    list-style: none;
    padding-left: 0;
}

.title-bar li {
    margin: 12px 0;
}

/* Unread Mail Highlight */
.unread-count {
    background-color: #f00;
    color: white;
    font-family: "Times New Roman", Times, serif;  /* force same font */
    font-weight: bold;                             /* force same weight */
    text-decoration: none;
    padding: 0 6px; /* optional spacing */
    border-radius: 3px; /* optional rounding */
}

#editor {
    min-height: 200px;
    min-width: 500px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    margin-top: 5px;
    cursor: text;
}

#editor:focus-within {
    border-color: #007BFF;
    outline: none;
}

.editor-toolbar {
    margin-top: 10px;
    margin-bottom: 5px;
    display: flex;
    gap: 8px;
}

