#logo h1 {
    font-size: 40px !important;
    font-weight: 700 !important;
    margin: 0;
    padding: 0;
    line-height: 1;
}

#logo h1 span {
    font-weight: 700 !important;
}

#logo h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 5px 0 0 0;
    padding: 0;
    line-height: 1;
}


.nav-link {
    float: right;
    font-size: 19x;
    color: #666;
    text-decoration: none;
    font-weight: bold;
    margin-right: 35px
}

.nav-link:hover {
    text-decoration: underline;
}

.dc-chart g.row text {
    fill: #000;
    font-size: 14px;
    font-weight: 500; 
}


/* No blue background when checked */
input[type="checkbox"] {
    accent-color: white;
    border: 1px solid #999;
}


.story-title {
    flex: wrap;
    font-size: 18px;
    font-weight: 600; 
    color: black;
    text-decoration: none;
    margin-right: 10px; 
    /* font-family: untitled-serif, serif; */
}

.story-count {
    font-size: 22px; 
    font-weight: 600; 
}

.state-story-count {
    font-size: 12px; 
    font-weight: 500; 
}

.story-filters {
    font-size: 18px; 
    font-weight: 500;
    opacity: 0.7;
}

.story-title:hover {
    text-decoration: underline;
}

.story-date {
    flex: wrap;
    font-size: 12px;
    font-weight: 500; 

    margin-left: 100px;
    margin-right: 10px; 
    margin-bottom: 20px; 
}

.story-authors {
    flex: wrap;
    font-size: 14px;
    font-weight: 500; 

    margin-left: 10px;
    margin-right: 10px; 
    margin-bottom: 20px; 
}


.story-topics-and-status {
    color: #060ff0;
    font-size: 14px;
    font-weight: 500;
}

.story-parties {
    flex: wrap;
    font-size: 17px;
    font-weight: 500; 
    margin-right: 10px; 
}

.story-excerpt{
    font-size: 14px;
    font-weight: 400; 
    line-height: -2px;

    margin-right: 10px; 
    margin-block-start: 2px;
    margin-block-end: 2px;
}

.story {
    display: flex;
    flex-direction: row;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #D3D3D3;
    margin: .5rem .1rem .5rem .1rem;
}

a.story-source{
    font-size: 16px;
    font-weight: 500; 
    color: var(--grey-text);
    margin-right: 10px; 
}


#chart-topic label {
    display: block;
    padding-right: 10px;
    padding-left: 20px;
    text-indent: -22px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
}

.state-img {
    padding-top: 16px;
    padding-right: 16px;
}

#filters {
    padding-top: 10px;
    font-size: 20px;
    font-weight: 500;   
}

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


.clear-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 8px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 16px;
    height: 30px; /* Explicitly set height */
  }
  
  .clear-button:hover {
    background-color: #e0e0e0;
  }


.story-image {
    object-fit: cover;
    float: right;
}

.logo-image {
    float: left;
}

h3.story-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 .1rem .2rem;
    padding-right: 5rem;
    line-height: 1.2;
    color: #111;
}

.story-body {
    margin-left: .5rem;
    overflow: auto;
    position: relative;
}

.story-country {
    position: absolute;
    top: 0;
    right: .5rem;
    font-size: .7em;
    font-weight: 500;
    color: #333;
}

.story-topic {    
    margin: 0 .2rem 0 .2rem;  
    font-weight: 500;
    font-size: .75em;
    color: #444;
}

.story-topic strong {
    color: #0056b3;
}

.story-meta {
    margin: 0 .2rem .15rem .2rem;
    font-size: .75em;
}

.story-meta .story-publication {
    color: #444;
}

.story-meta .story-publication strong {
    color: #0056b3;
}

.story-meta .story-date {
    color: #666;
    margin-left: .3rem;
    font-size: 0.95em;
}

.story-pills {
    margin: .15rem .2rem .2rem .2rem;
}

.sector-pill {
    display: inline-block;
    font-size: .6em;
    font-weight: 500;
    color: white;
    padding: .1rem .4rem;
    border-radius: 3px;
    margin-right: .3rem;
}

.gillmor-story-topic {    
    margin: .0rem .2rem .05em .2rem;  
    font-weight: 500;
    font-size: .8em;
    color: var(--red-text);
}

h3.gillmor-story-title {
    font-size: .9em;
    font-weight: 400;
    margin: .1rem .1rem .1rem .2rem;
}


p.story-headline {
    color: var(--black-text);
    font-size: .7em;
    margin: .3rem .2rem .1rem .2rem;  
    text-decoration: none;
}

p.story-excerpt {
    color: #333;
    font-size: .75em;
    line-height: 1.3;
    margin: 0 .2rem .2rem .2rem;  
    text-decoration: none;
}


.cornerstone-text {
    color: #000;     
    font-size: .9em;          
    font-weight: 500;         
    line-height: 0.4;         
  }

#title,
#title a {
  line-height: 0.9;            /* or 1.0, or even 20px for pixel‑perfect */
}



.story-body {    
    cursor: pointer; 
    transition: background-color 0.2s ease;
}

.story-body:hover {
    background-color: #f0f0f0; 
}




#chart-bureau {
    grid-area: chart-bureau;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bureau-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    min-height: 80px;
}

.bureau-panel:hover {
    background-color: #e8e8e8;
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bureau-panel.active {
    background-color: #0066cc;
    border-color: #0052a3;
    color: white;
}

.bureau-panel.active:hover {
    background-color: #0052a3;
}

.bureau-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.bureau-abbr {
    font-size: 22px;
    font-weight: 700;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.bureau-story-count {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
    margin-top: auto;
}


#chart-sector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.sector-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 80px;
    min-height: 80px;
}

.sector-panel:hover {
    background-color: #e8e8e8;
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sector-panel.active {
    background-color: #0066cc;
    border-color: #0052a3;
    color: white;
}

.sector-panel.active:hover {
    background-color: #0052a3;
}

.sector-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sector-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    margin-top: 4px;
    opacity: 0.7;
}

.sector-story-count {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
    margin-top: auto;
}


#loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.2s ease;
}

.loading-hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-visible {
    opacity: 1;
    pointer-events: all;
}
.spinner {
    width: 100px;
    height: 100px;
    border: 20px solid #f3f3f3;
    border-top: 20px solid #9ecae1;
    border-radius: 90%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.story-image {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

.story-image.loaded {
    opacity: 1;
}


.filter-boxes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.filter-box {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 12px;
    background-color: #f5f5f5;
}

.filter-box-title {
    font-size: 0.7em;
    margin-bottom: 0px;
    color: #888;
}

.filter-box-values {
    font-size: 0.7em;
    color: #333;
    margin-bottom: 0px;
}

/* Row highlighting for country rows - legacy support */
.row-background {
    transition: fill 0.2s ease, background-color 0.2s ease;
}

.row-background.row-highlight {
    background-color: #dadada !important;
    fill: #dadada !important;
}

/* Clickable country rows - legacy support */
[data-country] {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

[data-country]:hover .row-background {
    background-color: #e8e8e8 !important;
}

[data-country].country-active {
    background-color: #0052a3 !important;
    color: white !important;
}

[data-country].country-active .row-background {
    background-color: #0052a3 !important;
}

[data-country].country-active:hover .row-background {
    background-color: #003d7a !important;
}

/* New unified country table styles */
.country-header {
    display: grid;
    grid-template-columns: 150px 90px 90px 140px;
    font-weight: 600;
    font-size: 16px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 5px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.country-row {
    display: grid;
    grid-template-columns: 150px 90px 90px 140px;
    height: 22px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-row:hover {
    background-color: #e8e8e8;
}

.country-row.country-active {
    background-color: #0052a3;
    color: white;
}

.country-row.country-active:hover {
    background-color: #003d7a;
}

.country-cell {
    display: flex;
    align-items: center;
    height: 20px;
    margin-bottom: 2px;
}

.country-cell-name {
    font-weight: 500;
    font-size: 16px;
    padding-left: 4px;
}

.country-cell-bar {
    position: relative;
}

.country-bar {
    height: 20px;
    background-color: #9ecae1;
    position: relative;
}

.country-bar-stories {
    height: 20px;
    background-color: #bbb;
    position: relative;
}

.country-bar-label {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

#right-links {
    text-align: right;
    margin-right: 15px;
}

#right-links a {
    color: #0056b3;
    font-weight: 500;
}

#right-links a:hover {
    text-decoration: underline;
}

#about-link {
    font-size: 0.8em;
    font-weight: 1000;
}

.subtitle-updated {
    font-size: 15px;
    font-weight: 400;
    color: #777;
    margin-top: 5px;
    margin-bottom: 10px;
}