/* The voting pages. One stylesheet for all 268 - see
 * tools/vote_pages_build.py. Every colour, radius and font comes from
 * src/style.css; a second palette here would drift from the site the
 * first time either moved. */
/* Page-only. Everything colour, radius and font comes from style.css - a
     second palette here would drift from the site the first time either moved. */
  .vote-wrap{max-width:680px;margin:0 auto;padding:0 20px 76px}
  .cityhead{display:flex;align-items:flex-start;gap:14px;margin:18px 0 6px}
  .cityhead-gap{flex:1}
  .cityhead figure{margin:0;text-align:center;max-width:150px}
  .cityhead img{display:block;margin:0 auto;object-fit:contain}
  .cityhead .mayorpic img{width:72px;height:72px;border-radius:50%;object-fit:cover;border:2px solid var(--border)}
  .cityhead figcaption{font-size:.68rem;line-height:1.25;color:var(--muted);margin-top:4px}
  @media (max-width:520px){
    .cityhead figure{max-width:100px}
    .cityhead .mayorpic img{width:56px;height:56px}
    .cityhead figcaption{font-size:.6rem}
  }

  .proto-note{
    background:var(--sun);color:#3a2a05;border-radius:var(--radius);
    padding:12px 16px;margin:18px 0 22px;font-weight:600;font-size:.94rem;
  }
  .proto-note span{display:block;font-weight:400;opacity:.9;margin-top:3px}
  .who{
    display:flex;gap:14px;align-items:center;justify-content:center;text-align:center;
    flex-wrap:wrap;background:var(--surface);
    border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;
    margin:0 0 24px;font-size:.93rem;
  }
  .who .lock{color:var(--muted);font-size:.88rem}
  .vpanel{
    background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
    box-shadow:0 1px 2px var(--shadow-soft);margin:0 0 22px;overflow:hidden;
  }
  .vpanel h2{font-size:1.12rem;padding:16px 20px 4px;margin:0}
  .vpanel .hint{color:var(--muted);font-size:.9rem;padding:0 20px 14px;margin:0}
  .vrow{display:grid;grid-template-columns:1fr auto;gap:0 16px;align-items:center;padding:2px 20px;border-top:1px solid var(--border)}
  .vrow .nm{font-weight:600;font-size:.95rem}
  .vrow .rl{grid-column:1/-1;color:var(--muted);font-size:.75rem;font-weight:400;line-height:1;margin:-3px 0 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .vrow .st{grid-column:1/-1;font-size:.78rem;color:var(--muted);min-height:0;display:flex;align-items:baseline;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .vrow .st > *{flex:0 0 auto}
  .vrow .st b{color:var(--forest)}
  .vrow.lead{background:color-mix(in oklch, var(--leaf-light) 26%, transparent)}
  .vrow.lead .nm{font-weight:700}
  .stars{display:flex;flex-direction:row-reverse;gap:3px;justify-content:flex-end}
  .stars button{background:none;border:0;padding:0 2px;cursor:pointer;line-height:1;font-size:1.35rem;color:color-mix(in oklch, var(--muted) 38%, transparent);transition:transform .08s,color .12s}
  .stars button:hover{transform:scale(1.14)}
  .stars button.on{color:var(--sun)}
  .stars button:focus-visible{outline:2px solid var(--forest);outline-offset:2px;border-radius:4px}
  .vchip{display:inline-block;font-size:.72rem;padding:0 7px;border-radius:99px;border:1px solid var(--border);color:var(--muted)}
  .vchip.x2{border-color:var(--forest);color:var(--forest);font-weight:600;
    background:color-mix(in oklch, var(--leaf) 16%, transparent)}
  .ev{padding:14px 20px 16px;border-top:1px solid var(--border);background:var(--surface)}
  .ev h3{font-size:.95rem;margin:0 0 4px}
  .ev p{color:var(--muted);font-size:.88rem;margin:0 0 10px}
  .ev .soon{color:var(--muted);font-size:.88rem;margin:0}
.ev .links{display:flex;gap:8px;flex-wrap:wrap}
  .ev .lnk{
    font:inherit;font-size:.85rem;background:var(--card);color:var(--fg);border:1px solid var(--border);
    border-radius:99px;padding:6px 13px;cursor:pointer;text-align:right;
  }
  .ev .lnk:hover{border-color:var(--forest)}
  .ev .lnk.sel{border-color:var(--forest);background:color-mix(in oklch, var(--leaf) 14%, transparent)}
  .ev .verdict{margin-top:10px;font-size:.88rem;min-height:1.3em}
  .ev .verdict.pass{color:var(--forest);font-weight:600}
  .ev .verdict.fail{color:var(--danger)}
  .vlink{font-weight:600;color:var(--forest);text-decoration:underline}
.vjoin{
  font:inherit;font-weight:600;background:var(--forest);color:#fff;border:0;
  border-radius:99px;padding:7px 18px;cursor:pointer;
}
.vjoin:hover{background:var(--forest-dark)}
.vrow .stars button:disabled{cursor:default;opacity:.55}
.vrow .st b{font-size:1.05rem}
.vfoot{color:var(--muted);font-size:.86rem;border-top:1px solid var(--border);padding-top:16px}
  .vfoot code{font-family:ui-monospace,Menlo,monospace;font-size:.85em}
  .vreset{
    font:inherit;font-size:.85rem;background:none;border:1px solid var(--border);
    border-radius:99px;color:var(--muted);padding:5px 14px;cursor:pointer;margin-top:10px;
  }
  .vreset:hover{border-color:var(--danger);color:var(--danger)}

/* An address is Latin text in a right-to-left page. Rendered with the page's
   direction it reads as though it ended where it starts - and a person cannot
   check a link they cannot read. Anything showing a URL gets its own
   direction, including the input that phase 4 will add for evidence links. */
.ltr,
.vfoot a[href$=".json"],
.ev input[type="url"],
.ev input[type="text"]{
  direction:ltr;text-align:left;unicode-bidi:isolate;
}

/* Who is listed and who is not: true, needed once, and in the way afterwards.
   Folded shut by default and set small - a reader who wants it opens it, and
   everyone else gets straight to the names. */
.whonote{padding:0 20px 12px;font-size:.8rem;color:var(--muted)}
.whonote summary{cursor:pointer;color:var(--forest);font-weight:600;list-style:none}
.whonote summary::-webkit-details-marker{display:none}
.whonote summary::after{content:" ▾";font-size:.9em}
.whonote[open] summary::after{content:" ▴"}
.whonote p{margin:6px 0 0;max-width:62ch;line-height:1.5}
.whonote summary:focus-visible{outline:2px solid var(--forest);outline-offset:2px;border-radius:3px}

/* The save bar. Marking a star costs nothing; this is where a vote is spent,
   so it says how many are waiting and stays put until they are. */
.savebar{position:fixed;inset-inline:0;bottom:0;z-index:40;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding-block:10px;padding-inline:max(20px, calc((100% - 680px) / 2));background:var(--card);border-top:1px solid var(--border);box-shadow:0 -2px 10px var(--shadow-soft)}
.savebar[hidden]{display:none}
.savecount{font-weight:600}
.savemsg{color:var(--muted);font-size:.85rem;flex:1;min-width:0}
.savebtn{
  font:inherit;font-weight:600;background:var(--forest);color:#fff;border:0;
  border-radius:99px;padding:8px 26px;cursor:pointer;
}
.savebtn:hover{background:var(--forest-dark)}
.savebtn:disabled{opacity:.6;cursor:default}
.vote-wrap{padding-bottom:76px}

/* A row with unsaved marks, and a row already spent for today. */
.vrow.pending{background:color-mix(in oklch, var(--sun) 12%, transparent)}
.vrow.closed .stars button{opacity:.75}

/* The evidence link. An address is Latin text on a right-to-left page, so the
   field carries its own direction - see the .ltr rule above. */
.evlink{
  width:100%;font:inherit;font-size:.9rem;padding:8px 12px;
  border:1px solid var(--border);border-radius:8px;background:var(--card);
  color:var(--fg);direction:ltr;text-align:left;
}
.evlink:focus-visible{outline:2px solid var(--forest);outline-offset:1px;border-color:var(--forest)}
.evwhy{color:var(--muted);font-size:.85rem;margin:0 0 8px}
.ev h3{margin:0 0 6px}

/* The links readers attached, at the foot of the page. Ordered by how many
   people brought the same one - that is what "popularity" means here - and
   each carries the date it first arrived, so an old link reads as old. */
.linkspanel[hidden]{display:none}
.linklist{list-style:none;margin:0;padding:0 20px 14px}
.linklist li{
  display:flex;align-items:baseline;gap:10px;
  padding:6px 0;border-top:1px solid var(--border);font-size:.88rem;
}
.linklist li:first-child{border-top:0}
.linklist a{
  flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  direction:ltr;text-align:left;color:var(--forest);
}
.linklist .when{color:var(--muted);font-size:.78rem;white-space:nowrap;direction:ltr}
.linklist .count{
  color:var(--muted);font-size:.75rem;white-space:nowrap;
  border:1px solid var(--border);border-radius:99px;padding:0 7px;
}

/* One subheading instead of the same title repeated down the list. */
.subhead{padding:12px 20px 5px;text-align:center;font-weight:700;font-size:.9rem;color:var(--fg);border-top:1px solid var(--border);letter-spacing:.01em}

/* The row is clickable to clear, so say so on a pointer device - but only
   where there is something to clear. */
.vrow.pending{cursor:pointer}

/* The mayor stands alone; the deputies are a block. */
.vrow.head{margin-bottom:14px}
.vrow.deputy{margin:0}
.vrow.deputy + .vrow.deputy{border-top:1px solid var(--border);margin-top:0;padding-top:2px}

/* "This one is mine" - takes a published link into the box without opening it. */
.takelink{
  font:inherit;font-size:.72rem;white-space:nowrap;cursor:pointer;
  background:none;color:var(--forest);
  border:1px solid var(--border);border-radius:99px;padding:1px 9px;
}
.takelink:hover{border-color:var(--forest);background:color-mix(in oklch, var(--leaf) 12%, transparent)}
.takelink:focus-visible{outline:2px solid var(--forest);outline-offset:2px}

/* With nothing left to save the bar is only a message, so it should read as
   one rather than as an empty toolbar. */
.savebtn[hidden]{display:none}
.savebar .savemsg:only-child,
.savebar .savecount:empty + .savemsg{color:var(--forest);font-weight:600;font-size:.92rem}

/* A link shows what the page calls itself; the host says where that is. */
.linklist .host{color:var(--muted);font-size:.75rem;white-space:nowrap;direction:ltr}

/* The way in: 268 authorities, filtered as you type. */
.citysearch{
  width:100%;font:inherit;font-size:1rem;padding:11px 14px;margin:18px 0 8px;
  border:1px solid var(--border);border-radius:var(--radius);
  background:var(--card);color:var(--fg);
}
.citysearch:focus-visible{outline:2px solid var(--forest);outline-offset:1px;border-color:var(--forest)}
.found{color:var(--muted);font-size:.85rem;margin:0 0 10px}
.citylist{list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px}
.citylist li[hidden]{display:none}
.citylist a{
  display:flex;align-items:center;justify-content:flex-start;gap:9px;
  padding:9px 13px;border:1px solid var(--border);border-radius:10px;
  background:var(--card);color:var(--fg);text-decoration:none;font-size:.92rem;
}
.citylist a:hover{border-color:var(--forest);background:color-mix(in oklch, var(--leaf) 8%, transparent)}
.citylist .crestslot{flex:0 0 26px;width:26px;height:26px;
  display:flex;align-items:center;justify-content:center}
.citylist .crestslot img{max-width:100%;max-height:100%;object-fit:contain}
