/* ── Global ── */
body {
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    color: #333;
    background: #fff;
    margin: 0;
}

a { color: #8b5030; }
a:hover { color: #5a3020; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

/* ── Header ── */
#header {
    background: #2c1810;
    color: #fff;
    padding: 50px 0 30px;
}

#header h1 {
    font-size: 48px;
    margin-bottom: 5px;
}

#header h2 {
    font-size: 22px;
    font-weight: 300;
    font-family: 'Raleway', sans-serif;
    color: #ccc;
    margin-top: 0;
}

/* ── Navigation ── */
#nav {
    background: #f8f4f0;
    border-bottom: 1px solid #d0c8b8;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

#nav .nav-link {
    display: inline-block;
    padding: 6px 20px;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

#nav .nav-link:hover {
    color: #333;
    border-bottom-color: #c0b090;
}

#nav .nav-link.active {
    color: #8b5030;
    border-bottom-color: #8b5030;
}

/* ── Content Sections ── */
.content-section {
    display: none;
    padding: 40px 0 60px;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-size: 32px;
    margin-bottom: 10px;
    border-bottom: 2px solid #333;
    padding-bottom: 8px;
    display: inline-block;
}

.section-desc {
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
    max-width: 800px;
}

/* ── About ── */
.abstract {
    font-size: 16px;
    line-height: 1.7;
    max-width: 800px;
    margin-bottom: 30px;
}

.authors h3, .method-note h3 {
    font-size: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-top: 30px;
}

.authors p { margin: 5px 0; }

.method-note {
    background: #faf8f4;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #e8e0d0;
}

.method-note p { font-size: 14px; margin: 5px 0; }

/* ── Corpus Cards ── */
.corpus-card {
    background: #faf8f4;
    border: 1px solid #e0d8c8;
    border-radius: 5px;
    padding: 20px;
}

.corpus-card h3 {
    font-size: 22px;
    color: #2c1810;
    margin-bottom: 2px;
}

.corpus-card h4 {
    font-size: 14px;
    color: #887766;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    margin-bottom: 10px;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.available {
    background: #d8e8d0;
    color: #2a4a20;
}

.status-badge.in-progress {
    background: #e8dcc8;
    color: #5a4020;
}

/* ── Word Chips ── */
.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.word-chip {
    display: inline-block;
    padding: 5px 14px;
    background: #f0ece4;
    border: 1px solid #d0c8b8;
    border-radius: 16px;
    font-size: 13px;
    color: #4a3020;
}

/* ── Placeholder Charts ── */
.placeholder-chart {
    background: #faf8f4;
    border: 2px dashed #d0c8b8;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    color: #887766;
    font-size: 15px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-msg {
    color: #887766;
    font-size: 13px;
    font-style: italic;
    padding: 20px;
}

/* ── Topic Selector ── */
#topic-selector {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #d0c8b8;
    border-radius: 5px;
    padding: 10px;
    background: #faf8f4;
}

.selector-header {
    margin-bottom: 10px;
}

/* ── Data Table ── */
.table th {
    background: #f0ece4;
    font-weight: 600;
    font-size: 14px;
    border-color: #d0c8b8;
}

.table td {
    font-size: 14px;
    border-color: #e0d8c8;
}

/* ── Source Toggle ── */
.source-toggle .btn {
    margin: 0 4px;
    font-size: 13px;
    padding: 4px 14px;
}

.source-toggle .btn.active {
    background: #2c1810;
    color: #fff;
    border-color: #2c1810;
}

/* ── Footer ── */
footer {
    background: #2c1810;
    color: #999;
    padding: 20px 0;
    font-size: 13px;
}

footer a { color: #c89070; }
footer a:hover { color: #fff; }

/* ── Dendrogram ── */
#dendrogram-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 700px;
    border: 1px solid #e0d8c8;
    border-radius: 5px;
    background: #faf8f4;
    margin-bottom: 30px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #header h1 { font-size: 28px; }
    #header h2 { font-size: 16px; }
    #nav .nav-link { padding: 6px 10px; font-size: 13px; }
}
