/* Endorsements (js/endorsements.js): the person page's "Who backs them", the race page's side-by-side card, Today's
   Endorsement card and the guide's "An endorser's picks" (the owner's pick of mock-endorsements, November 13, 2026).
   Colours are the site's tokens (css/design.css's --g-*, dark in css/dark.css) and the party colours, so the dark look
   follows without colours of its own. */

/* ---------- a list of endorsements ---------- */
.en-note { margin: 0; color: var(--g-ink-2); font-size: 14px; line-height: 1.45; }
.en-foot { margin: 0; color: var(--g-muted); font-size: 12.5px; line-height: 1.45; }
.en-list { display: grid; margin: 0; padding: 0; list-style: none; }
.en-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--g-line); }
.en-row:first-child { padding-top: 2px; border-top: 0; }
.en-row:last-child { padding-bottom: 0; }
.en-body { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.en-name { color: var(--g-ink); font-size: 15px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.en-name a, .en-open { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.en-open { padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.en-meta { color: var(--g-muted); font-size: 13px; line-height: 1.35; }
.en-kind { color: var(--k, var(--g-accent)); font-weight: 700; }
.en-src { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--k, var(--g-accent)); font-size: 13px; font-weight: 600; text-decoration: none; }
.en-src.is-plain { color: var(--g-muted); font-weight: 500; }
.en-src .g-icon { width: 13px; height: 13px; }
.en-src.is-icon { margin: 0 0 0 2px; vertical-align: -2px; }
/* the mark: the endorser's face in their party's ring when they're on Gia (the initials without a photo), else their kind's icon */
.en-face { --party: #8a2be2; flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: 2px; border-radius: 50%;
  background: var(--g-track) center 22% / cover no-repeat; box-shadow: 0 0 0 2px var(--party); color: var(--g-ink-2); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.en-face.is-D { --party: #0022ff; }
.en-face.is-R { --party: #ff0000; }
.en-face.is-xs { width: 28px; height: 28px; font-size: 10.5px; }
.en-ico { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; margin: 2px; border-radius: 50%; background: var(--g-track); color: var(--g-ink-2); }
.en-ico.is-xs { width: 28px; height: 28px; }
.en-ico .g-icon { width: 16px; height: 16px; }
.en-ico.is-xs .g-icon { width: 14px; height: 14px; }
/* withdrawn: greyed and struck through, with the day it was withdrawn (rule 3: it stays, marked) */
.en-row.is-withdrawn > :first-child { filter: grayscale(1); opacity: .45; }
.en-row.is-withdrawn .en-name { color: var(--g-muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.en-row.is-withdrawn .en-name a, .en-row.is-withdrawn .en-open { text-decoration: inherit; }
.en-row.is-withdrawn .en-meta { opacity: .8; }
.en-wdpill { margin-top: 3px; padding: 3px 9px; background: var(--g-track); color: var(--g-ink-2); font-size: 12px; }
.en-wd { color: var(--g-ink-2); font-weight: 700; }
.en-none { margin: 0; color: var(--g-muted); font-size: 13px; }
.en-more { display: inline; justify-self: start; line-height: 1.35; color: var(--k, var(--g-accent)); font-size: 13px; font-weight: 700; text-decoration: none; }
.en-more .g-icon { width: 13px; height: 13px; margin-left: 2px; vertical-align: -2px; }
/* (a person in more than one race: a heading for each) */
.en-pos { margin: 6px 0 0; color: var(--g-ink-2); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

/* ---------- the race: candidates side by side, who backs each under them ---------- */
.en { display: grid; gap: 12px; }
.en[hidden] { display: none; }
.en-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 14px; }
.en-sides.is-many { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.en-side { --party: #8a2be2; display: grid; align-content: start; gap: 10px; min-width: 0; }
.en-side[data-party="democrat"] { --party: #0022ff; }
.en-side[data-party="republican"] { --party: #ff0000; }
.en-cand { display: grid; justify-items: center; gap: 5px; padding: 0 0 10px; border: 0; border-bottom: 2px solid var(--party); background: none; color: inherit; font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
div.en-cand { cursor: default; }
.en-cand b { color: var(--g-ink); font-family: var(--font-head); font-size: 17px; font-weight: 500; line-height: 1.2; }
.en-cand .pos-face { margin-bottom: 2px; }
.en-cand .g-pill { padding: 3px 9px; font-size: 12px; }
.en-vs { align-self: start; margin-top: 14px; }
.en-row.is-compact { gap: 8px; padding: 8px 0; }
.en-row.is-compact:first-child { padding-top: 0; }
.en-row.is-compact .en-name { font-size: 14px; }
.en-row.is-compact .en-meta { font-size: 12.5px; }
@media (max-width: 620px) {
  .en-sides, .en-sides.is-many { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .en-vs { display: none; }
  .en-cand b { font-size: 15px; }
  .en-row.is-compact { grid-template-columns: minmax(0, 1fr); gap: 4px; }   /* (the columns are narrow: a face over the name, no kind icon) */
  .en-row.is-compact > .en-ico { display: none; }
}

/* ---------- Today: the card open, both sides of the race inside it ---------- */
.en-today { --k: var(--g-ballot); margin: 4px 0 2px; }
.en-today .en-cand .st-face { margin-bottom: 2px; }
.en-today .en-cand b { font-size: 15px; }
/* (two columns at every width: the page is narrow, a phone or the pane on a computer; no "vs" here) */
.en-today .en-sides, .en-today .en-sides.is-many { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.en-today .en-vs { display: none; }
.en-today .en-row.is-compact { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.en-today .en-row.is-compact > .en-ico { display: none; }

/* ---------- the guide's shortcut card (js/voter.js) ---------- */
.en-sc select { max-width: 100%; min-width: 0; }
.en-sc .vg-pb-set { flex-wrap: wrap; }
.en-sc .vg-sc-go { white-space: normal; text-align: left; line-height: 1.25; }
