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

body {
    background-color: #f5f0e8;
    color: #2c2c2c;
    font-family: Georgia, serif;
    display: flex;
    min-height: 100vh;
}

a {
    color: #4a7ab5;
}

a:visited {
    color: #7a5ab5;
}

a:hover {
    color: #2a5a95;
}

/* ── Sidebar ── */
#sidebar {
    width: 220px;
    min-width: 220px;
    background-color: #ede8dc;
    border-right: 1px solid #ccc;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

#sidebar-title {
    padding: 0 16px 16px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 16px;
}

#sidebar-title h1 {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.3;
    color: #2c2c2c;
}

#sidebar-title p {
    font-size: 0.75rem;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

#sidebar nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c2c2c;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

.nav-item:hover {
    background-color: #d8d0c0;
}

.nav-item.active {
    background-color: #d0c8b8;
    font-weight: bold;
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/*Main content*/
#main-content {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#hero-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

#hero-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #c8b89a, #a89878);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-style: italic;
}

/* ── Home page sections ── */
.home-section {
    background-color: #faf7f2;
    border: 1px solid #d8d0c0;
    border-radius: 6px;
    padding: 24px 32px;
    margin: 16px 24px;
}

.home-section h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #2c2c2c;
}

.home-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #444;
}

.home-section ul, .home-section ol {
    padding-left: 20px;
    margin-top: 8px;
}

.home-section li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
}

.example-block {
    background-color: #f0ece4;
    border-left: 4px solid #a89878;
    padding: 16px 20px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

.example-block code {
    font-family: monospace;
    font-size: 0.9rem;
    display: block;
    margin-top: 8px;
    white-space: pre;
}

/* ── Browse page ── */
#main-container-div {
    padding: 24px;
    flex: 1;
}

#top-message-div {
    text-align: center;
    margin-bottom: 20px;
}

/* ── Filters ── */
#filters-div {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 16px 20px;
    background-color: #faf7f2;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
}

#filters-div > * {
    margin: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

.filter-group.search-group {
    min-width: 200px;
    flex: 1;
}

#filters-div label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b5f4a;
}

#filter-search {
    background-color: #fff;
    color: #2c2c2c;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    width: 160px;
}

#filter-search:focus {
    border-color: #a89878;
}

#filters-div select {
    background-color: #fff;
    color: #2c2c2c;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    width: 160px;
}

#filters-div select:focus {
    border-color: #a89878;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

#apply-filters-button,
#clear-filters-button {
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #a89878;
    transition: background-color 0.15s;
    margin-top: 0;
}

#apply-filters-button {
    background-color: #a89878;
    color: #fff;
}

#apply-filters-button:hover {
    background-color: #8a7a5a;
    border-color: #8a7a5a;
}

#clear-filters-button {
    background-color: transparent;
    color: #6b5f4a;
}

#clear-filters-button:hover {
    background-color: #ede8dc;
}
#statistics-div {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 16px;
    background-color: #faf7f2;
    border-radius: 6px;
}

.paper-div {
    border: 1px solid #ccc;
    padding: 16px;
    margin: 12px 0;
    background-color: #faf7f2;
    border-radius: 6px;
}

.paper-div h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.paper-div p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}