* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
}

body {
    background: #fafaf8;
    color: #1a1a1a;
    padding: 2rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

h1 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

h3 {
    margin-top: 1rem;
    font-weight: 500;
    padding: 2rem;

}

.subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 1rem;
    font-family: Arial, sans-serif;
}

#controls {
    margin-bottom: 0;
}

/* Topic Buttons Styling */
.topic-group-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aaa;
    font-family: Arial, sans-serif;
    margin-bottom: 6px;
}

#topic-buttons-political,
#topic-buttons-nonpolitical {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.topic-btn {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: opacity 0.15s, outline 0.15s;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.topic-btn[data-type="political"] {
    background-color: #faeeda;
    color: #633806;
    border: 0.5px solid #ef9f27;
}
.topic-btn[data-type="political"]:hover {
    background-color: #fac775;
}
.topic-btn[data-type="political"].active {
    background-color: #ba7517;
    color: white;
    border-color: #633806;
    font-weight: 500;
}

.topic-btn[data-type="non-political"] {
    background-color: #e1f5ee;
    color: #085041;
    border: 0.5px solid #5dcaa5;
}
.topic-btn[data-type="non-political"]:hover {
    background-color: #9fe1cb;
}
.topic-btn[data-type="non-political"].active {
    background-color: #0f6e56;
    color: white;
    border-color: #085041;
    font-weight: 500;
}

/* Status Bar Styling */
#status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 0.5px solid #ddd;
    border-bottom: 0.5px solid #ddd;
    padding: 8px 0;
    margin-top: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #555;
}

#status-bar strong {
    color: #1a1a1a;
    font-weight: 500;
}

#right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}


.type-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    font-family: Arial, sans-serif;
}

.type-badge.political {
    background-color: #faeeda;
    color: #633806;
    border: 0.5px solid #ef9f27;
}
.type-badge.non-political {
    background-color: #e1f5ee;
    color: #085041;
    border: 0.5px solid #5dcaa5;
}


.legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    font-family: Arial, sans-serif;
}

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: 4px;
    flex-shrink: 0;
}

#reset-zoom {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 0.5px solid #ccc;
    background: white;
    color: #555;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: 400;
    transition: background 0.15s;
    margin: 0;
}

#reset-zoom:hover {
    background: #f0f0f0;
}

#vis {
    max-width: 1280px;
    margin: 0 auto;
}

#vis svg {
    display: block;
    width: 100%;
    border: 0.5px solid #ddd;
    background: white;
}

.x-axis path,
.y-axis path,
.x-axis line,
.y-axis line {
    stroke: #333;
    shape-rendering: crispEdges;
}

.x-axis text,
.y-axis text {
    font-size: 12px;
    font-family: Arial, sans-serif;
}

.axis-label {
    font-size: 14px;
    font-weight: bold;
}

#tooltip {
    position: absolute; /* So we can move it with the cursor */
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    pointer-events: none; /* Prevent tooltip from interfering with mouse events */
    font-size: 12px;
} 

/* Bar Chart Styling */
.chart-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 24px;
}

#bar-chart svg {
    width: 100%;
    height: auto;
    display: block;
} 

.bar-title {
    font-size: 23px;
    font-weight: 400;
}

.bar-caption {
    font-size: 11px;
    fill: #666;
    font-family: Arial, sans-serif;
}

.bar-label {
    font-size: 12px;
}

.bar-name {
    font-size: 11px;
}

/* Background Info Styling + Formatting */
.background-info {
    max-width: 1280px;
    margin: 2rem auto;
    font-family: Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

.background-info h2 {
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-top: 2rem;
}

.background-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-family: Georgia, 'Times New Roman', serif;
}

.background-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-family: Arial, sans-serif;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.background-info p,
.background-info ul,
.background-info li {
    font-size: 14px;
    color: #444;
    font-family: Arial, sans-serif;
}

.background-info p {
    margin-bottom: 0.75rem;
}

.background-info ul {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.background-info li {
    margin-bottom: 0.4rem;
}

/* Topic Section Style + Formatting */
.topics-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.topics-section {
    display: flex;
    gap: 48px;
}

.topics-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
}

.topics-col-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #aaa;
    margin-bottom: 0.25rem;
}

.topic-dropdown {
    width: 100%;
    margin-bottom: 5px;
    border-radius: 20px;
}

.topic-dropdown[data-type="political"] {
    background-color: #faeeda;
    border: 0.5px solid #ef9f27;
}

.topic-dropdown[data-type="non-political"] {
    background-color: #e1f5ee;
    border: 0.5px solid #5dcaa5;
}

.topic-dropdown[open] {
    border-radius: 10px;
}

.topic-dropdown summary {
    font-size: 13px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    gap: 12px;
}

.topic-dropdown[data-type="political"] summary {
    color: #633806;
}

.topic-dropdown[data-type="non-political"] summary {
    color: #085041;
}

.topic-dropdown summary::after {
    content: '+';
    font-size: 14px;
    color: inherit;
    opacity: 0.6;
}

.topic-dropdown[open] summary::after {
    content: '−';
}

.topic-dropdown .dropdown-content {
    padding: 6px 12px 10px;
    font-size: 12px;
    font-family: Arial, sans-serif;
}

.topic-dropdown[data-type="political"] .dropdown-content {
    color: #633806;
}

.topic-dropdown[data-type="non-political"] .dropdown-content {
    color: #085041;
}

.topic-dropdown > p {
    font-size: 12px !important;
    margin-bottom: 2px !important;
    color: inherit !important;
    padding: 5px 12px;
}

.topic-dropdown > p strong {
    font-family: Arial, sans-serif;
    color: inherit;
}

a {
    color: inherit;
}