/* ============================================
   gb-polls.css — NYT/538 Editorial Design
   Scoped under body.gb-polls, prefix: gbp-
   ============================================ */

/* ---- Custom Properties ---- */
body.gb-polls {
    --gbp-bg: #FAFAFA;
    --gbp-surface: #FFFFFF;
    --gbp-text: #111111;
    --gbp-text-body: #333333;
    --gbp-text-secondary: #555555;
    --gbp-text-meta: #999999;
    --gbp-text-muted: #AAAAAA;
    --gbp-border: #E0E0E0;
    --gbp-border-light: #EEEEEE;
    --gbp-border-grid: #F0F0F0;
    --gbp-hover-bg: #FAFAFA;
    --gbp-positive: #2A9D2A;
    --gbp-negative: #C0392B;
    --gbp-nc: #CCCCCC;
    --gbp-serif: Georgia, "Times New Roman", serif;
    --gbp-sans: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    /* Party colors */
    --gbp-lab: #d50000;
    --gbp-con: #0087dc;
    --gbp-ref: #12B6CF;
    --gbp-ld: #FDBB30;
    --gbp-grn: #008066;
    --gbp-snp: #FFF95D;
    --gbp-pc: #3F8428;
    --gbp-oth: #9ca3af;
}

/* ---- Override style.css globals ---- */
body.gb-polls {
    background: var(--gbp-surface);
    font-family: var(--gbp-sans);
    color: var(--gbp-text-body);
}

/* ---- Content wrapper ---- */
.gbp-wrap {
    padding: 48px 32px 64px;
}

/* ---- Section separator ---- */
.gbp-rule {
    border: none;
    border-top: 1px solid var(--gbp-border);
    margin: 40px 0;
}

/* ---- Section label ---- */
.gbp-section-label {
    font-family: var(--gbp-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gbp-text-meta);
    margin: 0 0 16px 0;
    padding: 0;
}

/* ---- Links ---- */
.gbp-wrap a {
    color: var(--gbp-text);
    text-decoration: underline;
    text-decoration-color: #CCCCCC;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}
.gbp-wrap a:hover {
    text-decoration-color: var(--gbp-text);
}

/* ---- Buttons ---- */
.gbp-btn {
    font-family: var(--gbp-sans);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #DDDDDD;
    background: var(--gbp-surface);
    color: var(--gbp-text-body);
    padding: 6px 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.1s;
    line-height: 1;
    white-space: nowrap;
}
.gbp-btn:hover {
    border-color: #BBBBBB;
}
.gbp-btn.is-active {
    background: var(--gbp-text);
    color: var(--gbp-surface);
    border-color: var(--gbp-text);
}

/* ---- Dropdown select ---- */
.gbp-select {
    font-family: var(--gbp-sans);
    font-size: 13px;
    font-weight: 400;
    color: var(--gbp-text-body);
    border: 1px solid #DDDDDD;
    background: var(--gbp-surface);
    padding: 6px 28px 6px 10px;
    border-radius: 2px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 6px;
    line-height: 1.3;
}
.gbp-select:focus {
    outline: 2px solid var(--gbp-text);
    outline-offset: 2px;
}

/* ============================================
   1. MASTHEAD
   ============================================ */
.gbp-masthead {
    margin-bottom: 32px;
    max-width: 700px;
}
.gbp-kicker {
    font-family: var(--gbp-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gbp-text);
    margin: 0 0 8px 0;
}
.gbp-masthead-rule {
    border: none;
    border-top: 3px solid var(--gbp-text);
    margin: 0 0 16px 0;
}
.gbp-masthead-headline {
    font-family: var(--gbp-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--gbp-text);
    line-height: 1.15;
    margin: 0 0 6px 0;
}
.gbp-masthead-subtitle {
    font-family: var(--gbp-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--gbp-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   2. HERO NUMBERS STRIP
   ============================================ */
.gbp-hero-strip {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.gbp-hero-party {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px 10px 12px;
    border-left: 4px solid var(--party-color, #ccc);
    margin-bottom: 8px;
}
.gbp-hero-name {
    font-family: var(--gbp-sans);
    font-size: 11px;
    font-weight: 400;
    color: var(--gbp-text-secondary);
    margin: 0 0 2px 0;
    line-height: 1;
}
.gbp-hero-pct {
    font-family: var(--gbp-sans);
    font-size: 28px;
    font-weight: 700;
    color: var(--gbp-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.gbp-hero-changes {
    display: flex;
    gap: 8px;
    margin-top: 3px;
}
.gbp-hero-chg {
    font-family: var(--gbp-sans);
    font-size: 11px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}
.gbp-hero-chg-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--gbp-text-meta);
    margin-right: 2px;
    text-transform: uppercase;
}
.gbp-hero-chg.up { color: var(--gbp-positive); }
.gbp-hero-chg.down { color: var(--gbp-negative); }
.gbp-hero-chg.flat { color: var(--gbp-nc); }

.gbp-hero-footnote {
    font-family: var(--gbp-sans);
    font-size: 11px;
    font-style: italic;
    color: var(--gbp-text-meta);
    margin: 4px 0 0 0;
}

/* 2a. Quick Navigation CTAs */
.gbp-cta-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 14px 0 0 0;
}
.gbp-cta-link {
    font-family: var(--gbp-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--gbp-text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 4px 0;
}
.gbp-cta-link:hover {
    color: var(--gbp-text);
}
.gbp-cta-sep {
    width: 1px;
    height: 12px;
    background: var(--gbp-border);
    margin: 0 12px;
}

/* ============================================
   2b. LATEST POLL CARD
   ============================================ */
.gbp-latest-poll {
    margin-top: 16px;
}
.gbp-latest-poll-inner {
    border-top: 2px solid var(--gbp-text);
    padding: 12px 0 0 0;
}
.gbp-latest-poll-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}
.gbp-latest-poll-label {
    font-family: var(--gbp-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gbp-text-meta);
}
.gbp-latest-poll-date {
    font-family: var(--gbp-sans);
    font-size: 12px;
    color: var(--gbp-text-meta);
}
.gbp-latest-poll-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}
.gbp-latest-poll-pollster {
    font-family: var(--gbp-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--gbp-text);
}
.gbp-latest-poll-detail {
    font-family: var(--gbp-sans);
    font-size: 12px;
    color: var(--gbp-text-meta);
}
.gbp-latest-poll-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gbp-latest-poll-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gbp-sans);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.gbp-latest-poll-bar-name {
    width: 70px;
    flex-shrink: 0;
    color: var(--gbp-text-secondary);
    font-size: 12px;
}
.gbp-latest-poll-bar-track {
    flex: 1;
    height: 18px;
    background: var(--gbp-hover-bg);
    position: relative;
}
.gbp-latest-poll-bar-fill {
    display: block;
    height: 100%;
    opacity: 0.8;
}
.gbp-latest-poll-bar-val {
    width: 34px;
    text-align: right;
    font-weight: 700;
    color: var(--gbp-text);
    font-size: 13px;
}

/* ============================================
   3. TREND CHART
   ============================================ */
.gbp-chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.gbp-range-group {
    display: flex;
    gap: 4px;
}
.gbp-chart-right-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.gbp-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
}
.gbp-chart-container svg {
    width: 100%;
    height: 100%;
    display: block;
}
.gbp-chart-container .axis text {
    font-family: var(--gbp-sans);
    font-size: 11px;
    fill: var(--gbp-text-meta);
}
.gbp-chart-container .axis path,
.gbp-chart-container .axis .domain {
    display: none;
}
.gbp-chart-container .axis .tick line {
    stroke: none;
}
.gbp-chart-container .grid-line {
    stroke: var(--gbp-border-grid);
    stroke-width: 0.5;
}
.gbp-chart-container .party-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}
.gbp-chart-container .event-marker {
    stroke: #CCCCCC;
    stroke-width: 1;
    stroke-dasharray: 4,4;
}
.gbp-chart-container .event-label {
    font-family: var(--gbp-sans);
    font-size: 9px;
    fill: #BBBBBB;
}
.gbp-chart-container .crosshair {
    stroke: #DDDDDD;
    stroke-width: 1;
}
.gbp-chart-container .end-label {
    font-family: var(--gbp-sans);
    font-size: 11px;
    font-weight: 600;
}
.gbp-chart-container .raw-dot {
    opacity: 0.4;
}

/* Tooltip */
.gbp-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--gbp-surface);
    border: 1px solid var(--gbp-border);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: var(--gbp-sans);
    font-size: 12px;
    z-index: 10;
    box-shadow: none;
    white-space: nowrap;
}
.gbp-tooltip-date {
    font-weight: 700;
    color: var(--gbp-text-body);
    margin-bottom: 4px;
    font-size: 11px;
}
.gbp-tooltip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 0;
}
.gbp-tooltip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gbp-tooltip-party {
    flex: 1;
    color: var(--gbp-text-secondary);
    font-size: 11px;
}
.gbp-tooltip-val {
    font-weight: 700;
    color: var(--gbp-text);
    font-variant-numeric: tabular-nums;
    font-size: 11px;
}

/* Pollster filter banner */
.gbp-filter-banner {
    font-family: var(--gbp-sans);
    font-size: 12px;
    color: var(--gbp-text-secondary);
    margin-bottom: 12px;
    padding: 0;
}
.gbp-filter-banner a {
    color: var(--gbp-text-secondary);
    margin-left: 8px;
}

/* ============================================
   4. LEADING PARTY CALLOUT
   ============================================ */
.gbp-leading-party {
    font-family: var(--gbp-serif);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gbp-text-body);
    margin: 0;
    max-width: 700px;
}
.gbp-leading-party strong {
    font-weight: 700;
    color: var(--gbp-text);
}

/* ============================================
   5. SWING TABLE (NYT style)
   ============================================ */
.gbp-table-basis {
    font-family: var(--gbp-sans);
    font-size: 12px;
    color: var(--gbp-text-meta);
    margin: 0 0 8px 0;
}
.gbp-swing-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--gbp-sans);
    font-size: 14px;
}
.gbp-swing-table thead th {
    font-family: var(--gbp-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gbp-text-meta);
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #1a1a1a;
}
.gbp-swing-table thead th:not(:first-child) {
    text-align: right;
}
.gbp-swing-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gbp-border-light);
    color: var(--gbp-text-body);
    font-variant-numeric: tabular-nums;
}
.gbp-swing-table tbody td:not(:first-child) {
    text-align: right;
}
.gbp-swing-table tbody tr:last-child td {
    border-bottom: 2px solid #1a1a1a;
}
.gbp-swing-table tbody tr:hover {
    background: var(--gbp-hover-bg);
}
.gbp-swing-table .swing-positive {
    color: var(--gbp-positive);
    font-weight: 700;
}
.gbp-swing-table .swing-negative {
    color: var(--gbp-negative);
    font-weight: 700;
}
.gbp-party-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* ============================================
   6. RECENT POLLS TABLE
   ============================================ */
.gbp-polls-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.gbp-polls-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--gbp-sans);
    font-size: 13px;
    min-width: 600px;
}
.gbp-polls-table thead th {
    font-family: var(--gbp-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gbp-text-meta);
    text-align: left;
    padding: 6px 8px;
    border-bottom: 2px solid #1a1a1a;
    white-space: nowrap;
}
.gbp-polls-table thead th:not(:first-child):not(:nth-child(2)) {
    text-align: right;
}
/* Party-colored top borders on party columns */
.gbp-polls-table thead th.col-ref { border-top: 3px solid var(--gbp-ref); color: var(--gbp-ref); }
.gbp-polls-table thead th.col-lab { border-top: 3px solid var(--gbp-lab); color: var(--gbp-lab); }
.gbp-polls-table thead th.col-con { border-top: 3px solid var(--gbp-con); color: var(--gbp-con); }
.gbp-polls-table thead th.col-ld { border-top: 3px solid var(--gbp-ld); color: #c89600; }
.gbp-polls-table thead th.col-grn { border-top: 3px solid var(--gbp-grn); color: var(--gbp-grn); }
.gbp-polls-table thead th.col-snp { border-top: 3px solid #DAA520; color: #B8860B; }
.gbp-polls-table thead th.col-pc { border-top: 3px solid var(--gbp-pc); color: var(--gbp-pc); }
.gbp-polls-table thead th.col-oth { border-top: 3px solid var(--gbp-oth); color: var(--gbp-oth); }

.gbp-polls-table tbody td {
    padding: 8px 8px;
    border-bottom: 1px solid var(--gbp-border-light);
    color: var(--gbp-text-body);
    font-variant-numeric: tabular-nums;
}
.gbp-polls-table tbody td:not(:first-child):not(:nth-child(2)) {
    text-align: right;
}
.gbp-polls-table tbody tr:hover {
    background: var(--gbp-hover-bg);
}
.gbp-polls-table tbody tr.hidden-row {
    display: none;
}
.gbp-polls-table .date-col {
    font-size: 12px;
    color: var(--gbp-text-meta);
    white-space: nowrap;
}
.gbp-polls-table .pollster-col {
    cursor: pointer;
}
.gbp-polls-table .pollster-col:hover {
    text-decoration: underline;
    text-decoration-color: var(--gbp-text);
    text-underline-offset: 2px;
}
.gbp-polls-table .sample-col {
    font-size: 12px;
    color: var(--gbp-text-meta);
}
.gbp-polls-table .leading-val {
    font-weight: 700;
}

/* Polls intro text */
.gbp-polls-intro {
    font-family: var(--gbp-sans);
    font-size: 13px;
    color: var(--gbp-text-meta);
    margin: 0 0 12px 0;
    font-style: italic;
}

/* Clickable poll rows */
.gbp-polls-table .poll-row {
    cursor: pointer;
    transition: background 0.1s;
}
.gbp-polls-table .poll-row:hover {
    background: var(--gbp-hover-bg);
}
.gbp-polls-table .poll-row.is-expanded {
    background: var(--gbp-hover-bg);
    border-bottom-color: transparent;
}

/* Expandable row detail */
.gbp-polls-table .detail-row td {
    padding: 0;
    border-bottom: 1px solid var(--gbp-border-light);
}
.gbp-poll-detail {
    padding: 16px 12px;
    background: var(--gbp-hover-bg);
    font-size: 13px;
    color: var(--gbp-text-body);
    line-height: 1.5;
}
.gbp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--gbp-text-secondary);
}
.gbp-detail-meta strong {
    font-weight: 600;
    color: var(--gbp-text-body);
}
.gbp-detail-prev {
    font-size: 12px;
    color: var(--gbp-text-meta);
    font-style: italic;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gbp-border-light);
}
.gbp-detail-parties {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 24px;
    margin-bottom: 12px;
}
.gbp-detail-party-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.gbp-detail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gbp-detail-name {
    flex: 1;
    font-size: 13px;
    color: var(--gbp-text-body);
}
.gbp-detail-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    min-width: 42px;
    text-align: right;
}
.gbp-detail-change {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    min-width: 42px;
    text-align: right;
}
.gbp-detail-change.positive { color: var(--gbp-positive); }
.gbp-detail-change.negative { color: var(--gbp-negative); }
.gbp-detail-change.neutral { color: var(--gbp-text-meta); }
.gbp-detail-ge-btn {
    font-family: var(--gbp-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--gbp-text-secondary);
    background: none;
    border: 1px solid var(--gbp-border);
    border-radius: 2px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.1s;
}
.gbp-detail-ge-btn:hover {
    background: var(--gbp-text);
    color: var(--gbp-surface);
    border-color: var(--gbp-text);
}

/* ============================================
   6a. ONE YEAR AGO
   ============================================ */
.gbp-yearago-subtitle {
    font-family: var(--gbp-sans);
    font-size: 13px;
    color: var(--gbp-text-meta);
    margin: 0 0 12px 0;
}
.gbp-yearago-card {
    border-left: 3px solid var(--gbp-border);
    padding: 12px 16px;
    background: var(--gbp-hover-bg);
}
.gbp-yearago-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gbp-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gbp-text-meta);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gbp-border-light);
    margin-bottom: 4px;
}
.gbp-yearago-h-party {
    flex: 1;
    min-width: 100px;
    padding-left: 16px; /* dot space */
}
.gbp-yearago-h-val {
    width: 52px;
    text-align: right;
}
.gbp-yearago-h-spacer {
    width: 16px;
}
.gbp-yearago-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-family: var(--gbp-sans);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.gbp-yearago-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gbp-yearago-name {
    flex: 1;
    min-width: 100px;
    color: var(--gbp-text-body);
    font-size: 13px;
}
.gbp-yearago-then,
.gbp-yearago-now {
    width: 52px;
    text-align: right;
    font-weight: 700;
    color: var(--gbp-text);
}
.gbp-yearago-arrow {
    width: 16px;
    text-align: center;
    color: var(--gbp-text-meta);
    font-size: 12px;
}
.gbp-yearago-change {
    width: 52px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
}
.gbp-yearago-change.positive { color: var(--gbp-positive); }
.gbp-yearago-change.negative { color: var(--gbp-negative); }
.gbp-yearago-change.neutral { color: var(--gbp-text-meta); }

/* Year ago - actual poll cards */
.gbp-yearago-polls {
    margin-top: 16px;
}
.gbp-yearago-polls-label {
    font-family: var(--gbp-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gbp-text-meta);
    margin-bottom: 8px;
}
.gbp-yearago-poll-card {
    border: 1px solid var(--gbp-border-light);
    padding: 10px 14px;
    margin-bottom: 6px;
}
.gbp-yearago-poll-card:last-child {
    margin-bottom: 0;
}
.gbp-yearago-poll-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.gbp-yearago-poll-pollster {
    font-family: var(--gbp-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--gbp-text);
}
.gbp-yearago-poll-n {
    font-family: var(--gbp-sans);
    font-size: 11px;
    color: var(--gbp-text-meta);
}
.gbp-yearago-poll-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.gbp-yearago-poll-party {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--gbp-sans);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.gbp-yearago-poll-name {
    color: var(--gbp-text-secondary);
}
.gbp-yearago-poll-val {
    font-weight: 700;
    color: var(--gbp-text);
}

/* ============================================
   6b. TABLE CONTROLS & SORTABLE HEADERS
   ============================================ */
.gbp-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 8px;
}
.gbp-table-range-group {
    display: flex;
    gap: 4px;
}
.gbp-table-filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.gbp-table-count {
    font-family: var(--gbp-sans);
    font-size: 12px;
    color: var(--gbp-text-meta);
    margin: 4px 0 8px 0;
}
.gbp-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.gbp-th-sortable:hover {
    background: #f5f5f5;
}
.gbp-sort-icon {
    font-size: 8px;
    color: var(--gbp-text-meta);
    margin-left: 2px;
}

/* ============================================
   7. EXPLORE
   ============================================ */
.gbp-explore-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.gbp-explore-list li {
    line-height: 2.0;
}
.gbp-explore-list a {
    font-family: var(--gbp-serif);
    font-size: 16px;
    color: var(--gbp-text);
}

/* ============================================
   8. FAQ ACCORDION
   ============================================ */
.gbp-faq details {
    border-bottom: 1px solid var(--gbp-border-light);
}
.gbp-faq details:first-of-type {
    border-top: 1px solid var(--gbp-border-light);
}
.gbp-faq summary {
    font-family: var(--gbp-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--gbp-text);
    padding: 16px 32px 16px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    line-height: 1.4;
}
.gbp-faq summary::-webkit-details-marker {
    display: none;
}
.gbp-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 16px;
    font-family: var(--gbp-sans);
    font-size: 18px;
    font-weight: 300;
    color: var(--gbp-text-meta);
    line-height: 1;
}
.gbp-faq details[open] summary::after {
    content: '\2013';
}
.gbp-faq .gbp-faq-answer {
    font-family: var(--gbp-sans);
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
    padding: 0 0 16px 0;
    max-width: 600px;
}
.gbp-faq .gbp-faq-answer p {
    margin: 0 0 8px 0;
}
.gbp-faq .gbp-faq-answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   9. PAGE FOOTER ATTRIBUTION
   ============================================ */
.gbp-page-footer {
    margin-top: 0;
}
.gbp-footer-text {
    font-family: var(--gbp-sans);
    font-size: 11px;
    color: var(--gbp-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
.gbp-wrap *:focus-visible {
    outline: 2px solid var(--gbp-text);
    outline-offset: 2px;
}

/* ============================================
   NOSCRIPT FALLBACK
   ============================================ */
.gbp-noscript {
    padding: 24px;
    background: var(--gbp-hover-bg);
    border-radius: 4px;
    margin: 16px 0;
}
.gbp-noscript h2 {
    font-family: var(--gbp-serif);
    font-size: 20px;
    margin: 0 0 12px 0;
}
.gbp-noscript p, .gbp-noscript ul {
    font-family: var(--gbp-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gbp-text-body);
}

/* ============================================
   POLLSTER MODAL OVERRIDES
   ============================================ */
/* Modal uses inline styles; just ensure it doesn't inherit page font */
#pollsterModal {
    font-family: var(--gbp-sans);
}

/* ============================================
   NAV OVERRIDES - prevent gbp styles bleeding into nav
   ============================================ */
body.gb-polls footer a {
    text-decoration: none;
    color: inherit;
}
body.gb-polls .nav-logo h1 {
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: 481-768px */
@media (max-width: 768px) {
    .gbp-wrap {
        padding: 32px 16px 48px;
    }
    .gbp-masthead-headline {
        font-size: 26px;
    }
    .gbp-hero-strip {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }
    .gbp-hero-party {
        min-width: unset;
    }
    .gbp-hero-pct {
        font-size: 24px;
    }
    .gbp-chart-container {
        height: 300px;
    }
    .gbp-chart-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .gbp-chart-right-controls {
        width: 100%;
    }
    .gbp-select {
        flex: 1;
    }
    .gbp-rule {
        margin: 32px 0;
    }
    .gbp-swing-table,
    .gbp-polls-table {
        font-size: 13px;
    }
    .gbp-table-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .gbp-table-filter-group {
        width: 100%;
        flex-wrap: wrap;
    }
    .gbp-table-filter-group .gbp-select {
        flex: 1;
        min-width: 120px;
    }
    .gbp-explore-list a {
        font-size: 15px;
    }
}

/* Mobile: < 480px */
@media (max-width: 480px) {
    .gbp-masthead-headline {
        font-size: 24px;
    }
    .gbp-hero-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .gbp-hero-party {
        min-width: unset;
        padding: 8px 12px;
        margin-bottom: 0;
    }
    .gbp-hero-pct {
        font-size: 22px;
    }
    .gbp-hero-name {
        font-size: 10px;
    }
    .gbp-chart-container {
        height: 260px;
    }
    .gbp-range-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        flex-wrap: nowrap;
    }
    .gbp-chart-right-controls {
        flex-direction: column;
        gap: 6px;
    }
    .gbp-select {
        width: 100%;
    }
    .gbp-cta-link {
        font-size: 12px;
    }
    .gbp-cta-sep {
        margin: 0 8px;
    }
    .gbp-rule {
        margin: 24px 0;
    }
    .gbp-leading-party {
        font-size: 15px;
    }
    .gbp-faq summary {
        font-size: 15px;
    }
    .gbp-yearago-row {
        font-size: 13px;
    }
    .gbp-yearago-then,
    .gbp-yearago-now {
        width: 44px;
    }
    .gbp-yearago-change {
        width: 44px;
    }
    .gbp-yearago-h-val {
        width: 44px;
    }
    .gbp-table-range-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        flex-wrap: nowrap;
    }
}

/* Touch target minimum */
@media (pointer: coarse) {
    .gbp-btn {
        min-height: 44px;
        padding: 10px 14px;
    }
    .gbp-select {
        min-height: 44px;
    }
    .gbp-faq summary {
        min-height: 44px;
    }
}
