/* Wrapper */
#scorecard-tracker-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Filters */
.scorecard-tracker-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

/* Responsive Grid */
.scorecard-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    grid-template-columns: 1fr; /* Mobile-first: 1 column */
}

@media (min-width: 768px) {
    .scorecard-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (min-width: 1024px) {
    .scorecard-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktops */
    }
}

/* Card */
.scorecard-card {
    /* REMOVED: max-width: 325px; was here, preventing cards from growing */
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    margin: 0 auto;
}
.scorecard-card:hover {
    transform: translateY(-2px);
}

/* Card Header Section */
.scorecard-header {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
    align-items: center;
}
.scorecard-photo {
    flex: 0 0 100px;
}
.scorecard-photo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
}
.scorecard-identity {
    flex-grow: 1;
    text-align: center;
    line-height: 1.2;
}
.scorecard-position {
    font-size: 0.85em;
}
.scorecard-name {
    font-weight: bold;
    font-size: 1.2em;
}
.scorecard-district {
    font-size: 0.9em;
}
.scorecard-party {
    font-size: 0.9em;
    font-weight: bold;
}
.scorecard-party.republican { color: red; }
.scorecard-party.democrat { color: blue; }

/* Session Title */
.scorecard-session-title {
    font-size: 1.1em;
    font-weight: bold;
    text-align: left;
    width: 100%;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

/* Metrics Table Styling */
.scorecard-metrics {
    width: 100%;
    font-size: 14px;
}
.scorecard-metrics-header {
    display: flex;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    padding: 4px 8px;
    margin-bottom: 4px;
}
.scorecard-metric-row {
    display: flex;
    padding: 4px 8px;
}
.scorecard-metric-row:nth-child(even) {
    background-color: #f7f7f7;
}
.scorecard-metric-label {
    flex: 0 0 60%;
    text-align: left;
}
.scorecard-bills-rated {
    flex: 0 0 20%;
    text-align: center;
}
.scorecard-metric-score {
    flex: 0 0 20%;
    text-align: right;
    font-weight: bold;
}

/* Website URL at the bottom of the card */
.scorecard-site-url {
    margin-top: auto; /* Pushes to the bottom */
    padding-top: 10px;
    font-size: 12px;
    color: #777;
    text-align: center;
}

/* Pagination */
#scorecard-pagination {
    margin-top: 25px;
    text-align: center;
}
.scorecard-page-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}
.scorecard-page-btn.active {
    background: #333;
    color: #fff;
}