body {
    font-family: Georgia, 'Times New Roman', serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #ffffff;
    color: #333;
    line-height: 1.7;
}
h1 {
    color: #2774AE;
    font-size: 2.8em;
    margin-bottom: 0.3em;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    color: #666;
    font-size: 1.3em;
    margin-bottom: 1.5em;
    font-style: italic;
    font-weight: 400;
}

.byline {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #ddd;
}

h2 {
    color: #2774AE;
    font-size: 1.8em;
    margin-top: 2em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

h3 {
    color: #555;
    font-size: 1.3em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

p {
    margin-bottom: 1.2em;
    font-size: 1.05em;
}

ul {
    margin-bottom: 1.2em;
    font-size: 1.05em;
}

ul li {
    margin-bottom: 0.5em;
}

.article-text {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
}

.viz-section {
    margin: 3em 0;
    padding: 2em 0;
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
}

.viz-intro {
    font-style: italic;
    color: #666;
    margin-bottom: 1.5em;
    font-size: 1em;
}

.controls {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2em;
}

.control-group {
    margin-bottom: 1.5em;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.95em;
}

.toggle-container {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.radio-label input {
    margin-right: 8px;
}

select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.selected-item {
    background: #2774AE;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.remove-btn {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.remove-btn:hover {
    background: rgba(255,255,255,0.5);
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.pill-button {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pill-button:hover {
    border-color: #2774AE;
    background: #f0f7ff;
}

.pill-button.active {
    background: #2774AE;
    color: white;
    border-color: #2774AE;
}

#chart {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2em;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

#chart svg {
    max-width: 100%;
    display: block;
    overflow: hidden;
}

.line {
    fill: none;
    stroke-width: 2.5;
}

.axis {
    font-size: 12px;
}

.axis-label {
    font-size: 14px;
    font-weight: 600;
}

.legend {
    font-size: 13px;
}

.legend-item {
    cursor: pointer;
}

.legend-item:hover {
    opacity: 0.7;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.grid line {
    stroke: #e0e0e0;
    stroke-opacity: 0.7;
}

.grid path {
    stroke-width: 0;
}

.zoom-hint {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
    text-align: right;
}

figure {
    margin: 2em 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

figcaption {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 0.5em;
    line-height: 1.5;
    text-align: left;
}

#scatter-plot {
    width: 100%;
    margin: 2em 0;
    background: #fafafa;
    border-radius: 4px;
    padding: 20px;
}

.scatter-tooltip {
    line-height: 1.6;
}

.scatter-tooltip strong {
    color: #FFD100;
    font-size: 14px;
}

.grid line {
    stroke: #ccc;
    stroke-opacity: 0.5;
}

.grid path {
    stroke-width: 0;
}

/* ============================================
   SCATTER PLOT STYLES
   Add these to your existing styles.css
   ============================================ */

.scatter-controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.control-group select {
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 180px;
}

.control-group select:hover {
    border-color: #999;
}

.control-group select:focus {
    outline: none;
    border-color: #2774AE; /* UCLA Blue */
}

#scatter-plot {
    margin: 20px 0;
    background: white;
    border-radius: 4px;
}

.scatter-tooltip {
    opacity: 0;
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
}
