/* Styles for the polls plugin. Every selector is prefixed with .p-polls */

.p-polls h3 { margin: 30px 0 6px; }
.p-polls .lead { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.4; max-width: 38em; margin: 0 0 20px; }
.p-polls .lead b { font-weight: 800; }
.p-polls .lead.small { font-size: 17px; max-width: 44em; margin: 0 0 6px; }
.p-polls .fine a, .p-polls .sub a, .p-polls .lead a { text-decoration: underline; }
.p-polls .na { color: var(--ink-3); }

/* Headline tiles */
.p-polls .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.p-polls .tile { border: 2px solid var(--ink); padding: 12px 14px 10px; min-width: 0; }
.p-polls .tile.big { grid-column: span 2; box-shadow: 4px 4px 0 var(--ink); }
.p-polls .tile .who { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.p-polls .tile .num { font-weight: 900; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; font-variation-settings: "wdth" 74; margin: 4px 0 2px; }
.p-polls .tile.big .num { font-size: 56px; }
.p-polls .tile .num span { font-size: 0.5em; font-weight: 700; margin-left: 1px; }
.p-polls .tile .band { font: 400 12px/1.4 var(--mono); color: var(--ink-2); margin-bottom: 8px; }
.p-polls .chg { display: flex; justify-content: space-between; gap: 8px; font: 400 13px/1.3 var(--mono); border-top: 1px solid var(--rule); padding: 5px 0 0; margin-top: 5px; }
.p-polls .chg .lab { color: var(--ink-2); }
.p-polls .chg .val { font-weight: 500; white-space: nowrap; }
.p-polls .chg .val span { font-size: 9px; vertical-align: 1px; }
.p-polls .split { position: relative; display: flex; gap: 2px; height: 12px; margin: 8px 0 4px; }
.p-polls .split i { display: block; height: 100%; border-radius: 2px; }
.p-polls .split b { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.p-polls .split-lab { display: flex; justify-content: space-between; font: 400 12px/1.3 var(--mono); color: var(--ink-2); margin-bottom: 6px; }

/* Controls */
.p-polls .pp-controls { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start; margin: 6px 0 10px; }
.p-polls .ctl { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.p-polls .ctl.wide { flex: 1 1 100%; }
.p-polls .ctl-lab { font: 400 12px/1 var(--mono); color: var(--ink-2); }
.p-polls .ctl-note { flex: 1 1 280px; font-size: 14px; line-height: 1.4; color: var(--ink-2); margin: 0; max-width: 34em; align-self: center; }
.p-polls .seg { display: flex; flex-wrap: wrap; }
.p-polls .seg button, .p-polls .chips button {
  font: 500 14px/1 var(--display); color: var(--ink); background: var(--paper); cursor: pointer;
  border: 1px solid var(--ink); border-radius: 2px; padding: 9px 12px;
}
.p-polls .seg button { margin-right: -1px; border-radius: 0; }
.p-polls .seg button:first-child { border-radius: 2px 0 0 2px; }
.p-polls .seg button:last-child { border-radius: 0 2px 2px 0; margin-right: 0; }
.p-polls .seg button:hover, .p-polls .chips button:hover { background: var(--wash); }
.p-polls .seg button[aria-pressed="true"], .p-polls .chips button[aria-pressed="true"] { background: var(--mark); font-weight: 700; position: relative; }
.p-polls .seg button:focus-visible, .p-polls .chips button:focus-visible { z-index: 1; }
.p-polls .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-polls .chips button span { font: 400 12px var(--mono); color: var(--ink-2); margin-left: 3px; }
.p-polls button.link { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.p-polls button.link:hover { background: var(--mark); }
.p-polls .pp-picked { margin: 0 0 4px; min-height: 1.5em; }
.p-polls .pp-picked b { color: var(--ink); }

/* Trend charts */
.p-polls .chart .future { fill: var(--wash); }
.p-polls .chart .eday { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.p-polls .chart .halo { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.p-polls .chart .pick { cursor: pointer; }
.p-polls .chart .hit { touch-action: pan-y; }

/* Range rows (trend now versus forecast) */
.p-polls .rrs { max-width: 860px; margin: 4px 0 0; }
.p-polls .rr { display: grid; grid-template-columns: 132px minmax(0, 1fr) 190px; grid-template-areas: "name track num"; align-items: center; gap: 0 14px; padding: 7px 0; }
.p-polls .rr-name { grid-area: name; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.p-polls .rr-num { grid-area: num; font: 400 13px/1.2 var(--mono); color: var(--ink-2); white-space: nowrap; }
.p-polls .rr-num b { color: var(--ink); font-weight: 500; }
.p-polls .rr-num .n-arrow { margin: 0 5px; }
.p-polls .rr-track { grid-area: track; position: relative; height: 26px; }
.p-polls .rr-track s { position: absolute; top: -7px; bottom: -7px; width: 1px; background: var(--rule); }
.p-polls .rr-track s.ref { background: var(--ink); }
.p-polls .rr-track i { position: absolute; display: block; }
.p-polls .rr-track .thin { top: 10px; height: 6px; border-radius: 2px; }
.p-polls .rr-track .thick { top: 5px; height: 16px; border-radius: 2px; }
.p-polls .rr-track .mid { top: 1px; height: 24px; width: 4px; margin-left: -2px; border-radius: 1px; outline: 1.5px solid var(--paper); }
.p-polls .rr-track .now { top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2.5px solid var(--ink); background: rgba(255, 255, 255, .55); }
.p-polls .rr-axis { padding: 0; }
.p-polls .rr-axis .rr-track { height: 20px; }
.p-polls .rr-axis span { position: absolute; top: 4px; transform: translateX(-50%); font: 400 12px var(--mono); color: var(--ink-2); }
.p-polls .rr-legend { margin: 14px 0 0; }
.p-polls .rr-legend i { display: inline-block; flex: none; }
.p-polls .rr-legend .k-now { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--ink); }
.p-polls .rr-legend .k-mid { width: 4px; height: 16px; background: var(--ink); border-radius: 1px; margin: 0 4px; }
.p-polls .rr-legend .k-thick { width: 22px; height: 12px; background: #9a9a9a; border-radius: 2px; }
.p-polls .rr-legend .k-thin { width: 22px; height: 5px; background: #cfcfcf; border-radius: 2px; }

/* Poll table */
.p-polls .ctl-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin: 0 0 12px; }
.p-polls .ctl-row .count { font: 400 13px var(--mono); color: var(--ink-2); margin-left: auto; padding-bottom: 9px; }
.p-polls .ctl-row .select { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 12px; }
.p-polls .ctl-row .select select { max-width: 100%; }
.p-polls .scroller { overflow: auto; max-height: 540px; border: 2px solid var(--ink); }
.p-polls table.pt { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.p-polls table.pt th { position: sticky; top: 0; z-index: 1; background: var(--paper); border-bottom: 1px solid var(--ink); padding: 0; text-align: left; vertical-align: bottom; }
.p-polls table.pt th button { font: 400 12px/1.25 var(--mono); color: var(--ink-2); background: none; border: 0; padding: 9px 10px; cursor: pointer; width: 100%; text-align: inherit; display: inline-flex; align-items: flex-end; gap: 5px; }
.p-polls table.pt th.r button { justify-content: flex-end; text-align: right; }
.p-polls table.pt th button:hover { background: var(--wash); color: var(--ink); }
.p-polls table.pt th[aria-sort="ascending"] button, .p-polls table.pt th[aria-sort="descending"] button { color: var(--ink); font-weight: 500; background: var(--mark); }
.p-polls table.pt th .dir { font-size: 8px; min-width: 8px; padding-bottom: 2px; }
.p-polls table.pt th .sw { width: 9px; height: 9px; transform: translateY(-2px); }
.p-polls table.pt td { padding: 7px 10px; border-bottom: 1px solid var(--rule); font-size: 15px; white-space: nowrap; }
.p-polls table.pt td.r { text-align: right; font: 400 13.5px var(--mono); }
.p-polls table.pt td.date { font: 400 13px var(--mono); color: var(--ink-2); }
.p-polls table.pt td.who { font-weight: 700; }
.p-polls table.pt tbody tr:hover td { background: var(--wash); }
.p-polls table.pt tbody tr:last-child td { border-bottom: 0; }

/* Pollster adjustments */
.p-polls .hrs { max-width: 820px; margin: 14px 0 0; }
.p-polls .hr { display: grid; grid-template-columns: 210px minmax(0, 1fr) 54px; gap: 0 14px; align-items: center; padding: 6px 0; border-top: 1px solid var(--rule); }
.p-polls .hr-head, .p-polls .hr-axis { border-top: 0; padding: 0; }
.p-polls .hr-name { min-width: 0; }
.p-polls .hr-name b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; }
.p-polls .hr-name span { font: 400 12px/1.3 var(--mono); color: var(--ink-2); }
.p-polls .hr-track { position: relative; height: 30px; margin: 0 8px; }
.p-polls .hr-track s { position: absolute; left: 50%; top: -7px; bottom: -7px; width: 1px; background: var(--ink); }
.p-polls .hr-track i { position: absolute; display: block; }
.p-polls .hr-track .whisk { top: 14px; height: 2px; background: var(--ink); min-width: 1px; }
.p-polls .hr-track .dot { top: 8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--c); border: 2px solid var(--paper); box-sizing: border-box; }
.p-polls .hr-track .dot.few { background: var(--paper); border-color: var(--c); }
.p-polls .hr-val { font: 500 14px var(--mono); text-align: right; white-space: nowrap; }
.p-polls .hr-val.na { font-weight: 400; font-size: 12px; }
.p-polls .hr-head .hr-track, .p-polls .hr-axis .hr-track { height: 20px; font: 400 12px var(--mono); color: var(--ink-2); }
.p-polls .hr-head .hr-track { display: flex; justify-content: space-between; align-items: center; }
.p-polls .hr-head .hr-val { font: 400 12px var(--mono); color: var(--ink-2); }
.p-polls .hr-axis span { position: absolute; top: 3px; transform: translateX(-50%); }
.p-polls .hr-axis span:first-child { transform: none; }
.p-polls .hr-axis span:last-child { transform: translateX(-100%); }

/* Guide */
.p-polls .guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.p-polls .guide h3 { margin: 6px 0 8px; }
.p-polls .guide p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; }
.p-polls .guide .stat { background: var(--wash); padding: 10px 12px; font-size: 14.5px; }
.p-polls .guide .stat b { font-weight: 800; }

@media (min-width: 980px) {
  .p-polls .tiles { grid-template-columns: minmax(250px, 1.8fr) repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; }
  .p-polls .tile.big { grid-column: auto; }
  .p-polls .tile:not(.big) { padding: 12px 11px 10px; }
  .p-polls .tile:not(.big) .chg { font-size: 12.5px; }
}
@media (max-width: 900px) {
  .p-polls .guide { grid-template-columns: minmax(0, 1fr); max-width: 40em; }
}
@media (max-width: 640px) {
  .p-polls .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-polls .tile { padding: 10px 11px 8px; }
  .p-polls .tile .num { font-size: 34px; }
  .p-polls .tile.big .num { font-size: 48px; }
  .p-polls .rr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name num" "track track"; gap: 4px 10px; padding: 8px 0 10px; }
  .p-polls .rr-axis { padding: 0; }
  .p-polls .rr-axis .rr-name, .p-polls .rr-axis .rr-num { display: none; }
  .p-polls .rr-track { margin: 0 12px; }
  .p-polls .hr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 2px 10px; }
  .p-polls .hr-name { grid-area: name; }
  .p-polls .hr-val { grid-area: val; }
  .p-polls .hr-track { grid-area: track; margin: 0 26px; }
  .p-polls .hr-track s { top: 0; bottom: 0; }
  .p-polls .hr-head .hr-name, .p-polls .hr-axis .hr-name, .p-polls .hr-axis .hr-val { display: none; }
  .p-polls .hr-head { grid-template-areas: "track val"; grid-template-columns: minmax(0, 1fr) 44px; }
  .p-polls .hr-head .hr-track { margin: 0; }
  .p-polls .scroller { max-height: 460px; }
  .p-polls .ctl-row .count { margin-left: 0; }
}

/* Poll details: fieldwork, client, sample, source (table on wide screens, cards on phones) */
.p-polls table.pt td.cl { font-size: 14px; color: var(--ink-2); white-space: normal; min-width: 120px; max-width: 180px; line-height: 1.3; }
.p-polls table.pt td.src { font: 400 13px var(--mono); }
.p-polls table.pt td.src a { text-decoration: underline; }
.p-polls table.pt th .th { display: block; font: 400 12px/1.25 var(--mono); color: var(--ink-2); padding: 9px 10px; }
.p-polls table.pt td .how { display: block; font: 400 11.5px/1.3 var(--mono); color: var(--ink-2); white-space: normal; max-width: 170px; }
.p-polls .scroller.rich table.pt { min-width: 1060px; }
.p-polls .pp-flag { display: inline-block; font: 500 11.5px/1.3 var(--mono); color: var(--ink); background: var(--paper); border: 1.5px dashed var(--ink); padding: 1px 6px; margin: 3px 0 0; white-space: normal; }
.p-polls table.pt td .pp-flag { display: table; }
.p-polls table.pt tr.paid td { background: var(--wash); }
.p-polls .pcs { display: none; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.p-polls .pc { padding: 11px 0 12px; border-bottom: 1px solid var(--rule); }
.p-polls .pc.paid { background: var(--wash); padding-left: 10px; padding-right: 10px; }
.p-polls .pc-top { font-size: 16px; line-height: 1.3; }
.p-polls .pc-top .pp-flag { margin-left: 6px; }
.p-polls .pc-for { color: var(--ink-2); }
.p-polls .pc-meta { font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); margin: 3px 0 6px; }
.p-polls .pc-figs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.p-polls .pc-figs span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.p-polls .pc-figs b { font: 500 14px var(--mono); }
.p-polls .pc-src { font-size: 13px; margin-top: 6px; color: var(--ink-2); }
.p-polls .pc-src a { text-decoration: underline; }
@media (max-width: 700px) {
  .p-polls .scroller.rich { display: none; }
  .p-polls .pcs { display: block; max-height: 640px; overflow: auto; }
}

/* Leader ratings */
.p-polls .lb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.p-polls .lb-card { border: 2px solid var(--ink); padding: 12px 14px 12px; min-width: 0; }
.p-polls .lb-card h3 { margin: 0; font-size: 18px; }
.p-polls .lb-card h3 .for { font-weight: 400; color: var(--ink-2); font-variation-settings: "wdth" 100; font-size: 15px; }
.p-polls .lb-card h4 { margin: 12px 0 6px; font: 400 12px/1.2 var(--mono); color: var(--ink-2); }
.p-polls .lb-meta { margin: 3px 0 0; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }
.p-polls .lb-meta a, .p-polls .lb-q a { text-decoration: underline; }
.p-polls .lb-bar { display: flex; gap: 2px; height: 14px; }
.p-polls .lb-bar i { display: block; height: 100%; border-radius: 2px; min-width: 2px; }
.p-polls .lb-lab { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; font-size: 14px; }
.p-polls .lb-lab span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.p-polls .lb-lab b, .p-polls .lb-rate b { font: 500 14px var(--mono); }
.p-polls .lb-none { background: var(--rule); }
.p-polls .lb-rate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 5px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.p-polls .lb-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.p-polls .lb-net { font: 500 13px var(--mono); text-align: right; }
.p-polls .lb-nums { grid-column: 1 / -1; color: var(--ink-2); }
.p-polls .lb-q { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }

/* Seat polls */
.p-polls .sps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 860px; }
.p-polls .sp { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.p-polls .sp.paid { background: var(--wash); padding-left: 12px; padding-right: 12px; }
.p-polls .sp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.p-polls .sp-seat { font-size: 18px; font-weight: 800; font-variation-settings: "wdth" 80; }
.p-polls .sp-tag { font: 400 11.5px/1.3 var(--mono); border: 1px solid var(--ink-3); padding: 1px 6px; }
.p-polls .sp .pp-flag { margin: 0; }
.p-polls .sp-meta { margin: 4px 0 6px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }
.p-polls .sp-res { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px; font-size: 14px; padding: 3px 0; }
.p-polls .sp-res span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.p-polls .sp-res .sp-k { flex: 0 0 130px; font: 400 12px var(--mono); color: var(--ink-2); }
.p-polls .sp-res b { font: 500 14px var(--mono); }
.p-polls .sp-note { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.p-polls .sp-src { margin: 4px 0 0; font-size: 13px; }
.p-polls .sp-src a { text-decoration: underline; }
@media (max-width: 640px) { .p-polls .sp-res .sp-k { flex-basis: 100%; } }
