/* edsselection additions on top of eds.css (CampaignOS's design system). Mobile first: captains use cheap phones. */
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sidebar-foot .who { font-size: 13px; color: var(--ink-muted); }
.topbar-title { font-weight: 600; }
.public-main { max-width: 560px; margin: 0 auto; }
.flash { margin-bottom: 18px; }
.card-narrow { max-width: 520px; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photo-pair img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: var(--canvas-deep); }
.photo-slot { display: flex; flex-direction: column; gap: 8px; }
.photo-slot img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r); display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span {
  display: inline-block; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--canvas-deep); color: var(--ink); font-size: 14px; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.chip input:focus-visible + span { outline: 2px solid var(--blue); }
.geo-status { font-size: 13px; color: var(--ink-muted); }
.geo-status.ok { color: var(--green); }
.geo-status.bad { color: var(--red); }
.pu-results { margin-top: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 260px; overflow-y: auto; display: none; }
.pu-results button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; background: var(--panel); color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line-soft); font: inherit; font-size: 13.5px; cursor: pointer;
}
.pu-results button:hover { background: var(--panel-hover); }
.pu-chosen { font-size: 13px; color: var(--green); margin-top: 6px; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.progress-bar { height: 10px; border-radius: 99px; background: var(--canvas-deep); overflow: hidden; border: 1px solid var(--line); }
.progress-bar > i { display: block; height: 100%; background: var(--green); }
.muted { color: var(--ink-muted); }
.small { font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
@media (min-width: 821px) { .topbar-toggle { display: none; } }
/* .field label uppercases its labels - the chip options are answers, not labels. */
.field .chip { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; color: var(--ink); }
.field label.row { text-transform: none; letter-spacing: 0; font-weight: 400; }
.consent label.row { align-items: flex-start; }

/* ---------- phones first (owner, 2026-11-20: "to be consumed mainly on mobile devices") ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--canvas-deep); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    color: var(--ink-dim); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer;
  }
  .tab svg { width: 24px; height: 24px; }
  .tab.is-active { color: var(--green); }
  .tab:hover { text-decoration: none; color: var(--ink); }
  .app .main { padding-bottom: 96px; }
  .topbar { padding: 10px 16px; }
  .page-title { font-size: 24px; }
  .page-sub { font-size: 14px; margin-bottom: 18px; }
  .panel { padding: 16px; border-radius: var(--r); }
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 30px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .input, .select, .textarea { font-size: 16px; }   /* no zoom-on-focus on iPhones */

  /* Tables become one card per row: each cell shows its own label (data-label). */
  .table.cards-mobile thead { display: none; }
  .table.cards-mobile, .table.cards-mobile tbody, .table.cards-mobile tr, .table.cards-mobile td, .table.cards-mobile tfoot { display: block; width: 100%; }
  .table.cards-mobile tr { background: var(--panel-raised) !important; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 8px 12px; }
  .table.cards-mobile td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.cards-mobile td::before { content: attr(data-label); color: var(--ink-muted); font-size: 12px; text-align: left; flex: none; }
  .table.cards-mobile td.cell-main { font-weight: 600; font-size: 15px; text-align: left; }
  .table.cards-mobile td.cell-main::before { content: none; }
  .table.cards-mobile td.col-actions { justify-content: flex-start; }
  .table.cards-mobile td.col-actions::before, .table.cards-mobile td.col-rank { display: none; }
  .table.cards-mobile td.num { text-align: right; }
}
@media (max-width: 820px) {
  /* Number-heavy cards (LGA / ward rankings): figures two per row. */
  .table.cards-mobile.compact tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .table.cards-mobile.compact td.cell-main { grid-column: 1 / -1; }
  .table.cards-mobile.compact td.col-rank { display: none; }
  .table.cards-mobile.compact td { flex-direction: column; gap: 0; text-align: left; padding: 4px 0; }
  .table.cards-mobile.compact td.num { text-align: left; font-size: 17px; font-weight: 700; }
  .table.cards-mobile.compact td::before { font-size: 11px; font-weight: 500; }
}

/* Filter links on My voters / Evidence (2026-11-21) */
.chip-link { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: inherit; text-decoration: none; margin: 0 6px 6px 0; }
.chip-link.is-on { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.evidence-grid figure { margin: 0; }
.evidence-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.evidence-grid figcaption { font-size: 12px; margin-top: 4px; }
