/* =============================================================
   (802) Ballots styles
   Look: a paper ballot from the town clerk's office, with the
   colors of a Vermont October.
   ============================================================= */

:root {
  /* paper and ink */
  --paper: #F4EEDF;      /* ballot stock */
  --card: #FFFCF4;       /* fresh sheet */
  --ink: #1F1C18;
  --muted: #625B50;
  --rule: #D8CDB6;
  /* fall colors */
  --barn: #A8322D;
  --maple: #D9792B;
  --gold: #E2B33C;
  --spruce: #2F5B44;
  --slate: #5B6378;
  --error: #A8322D;
  /* leaning scale: blue, through purple, to red */
  --ln-m3: #1E4F8F; --ln-m2: #3A52A3; --ln-m1: #574CA8; --ln-0: #7044A0;
  --ln-p1: #8A3D88; --ln-p2: #9C3963; --ln-p3: #AA352E;

  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --font-sign: "Zilla Slab", Rockwell, Georgia, serif;
}

/* Always a paper ballot, even when the computer is in dark mode */
html { color-scheme: light; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--spruce); text-underline-offset: 3px; }

.top-in, .banner-in, main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
}

/* ---------- Masthead (painted landscape) and election banner ---------- */

/* The whole painting shows, top to bottom; logo and menu sit in its sky */
.masthead {
  position: relative;
  aspect-ratio: 1600 / 340;
  min-height: 190px;
  width: 100%;
  background: #D9CFB6 url("banner.svg") center bottom / cover no-repeat;
  border-bottom: 3px solid var(--ink);
}
.masthead .top-in { padding-top: 20px; }

.top-in {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.01em;
  white-space: nowrap;   /* keep "(802) Ballots" on one line */
  text-shadow: 0 0 10px rgba(244, 238, 223, 0.9), 0 0 2px rgba(244, 238, 223, 0.9);
}
.logo-mark { width: 68px; height: 44px; flex: none; }

nav { display: flex; gap: 10px; margin-left: auto; }
nav a {
  padding: 10px 22px;
  font-size: 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: rgba(244, 238, 223, 0.72);
  border: 1.5px solid transparent;
}
nav a:hover { background: rgba(244, 238, 223, 0.95); }
nav a[aria-current="page"] { background: var(--paper); border-color: var(--ink); }

/* Election banner: the date matters most, so it's big */
.banner { background: var(--ink); color: var(--paper); }
.banner-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.banner .ename {
  font-family: var(--font-sign);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.banner .edate {
  font-size: 1.1rem;
  font-weight: 700;
  font-stretch: 88%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.banner .countdown {
  font-size: 1rem;
  font-weight: 800;
  font-stretch: 88%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: var(--gold);
  padding: 3px 12px;
  border-radius: 999px;
}
.banner .register {
  margin-left: auto;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 var(--gold);
  padding: 7px 16px;
  border-radius: 4px;
  font-weight: 800;
  font-stretch: 88%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.banner .register:hover { background: #FFFFFF; }

/* The rubber stamp: says plainly this is a community project */
.stamp {
  display: inline-block;
  transform: rotate(-6deg);
  padding: 6px 14px;
  border: 3px solid var(--barn);
  outline: 1.5px solid var(--barn);
  outline-offset: 2px;
  border-radius: 3px;
  color: var(--barn);
  font-size: 0.9rem;
  font-weight: 800;
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-align: center;
  background: rgba(244, 238, 223, 0.85);
}

/* Handwriting, used sparingly, like a note in the margin */
.handwritten {
  font-family: var(--font-hand);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--barn);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  border-top: 3px double var(--ink);
}
.site-footer .foot-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .note {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink);
}

/* ---------- Ballot ovals ---------- */
.oval {
  flex: none;
  display: inline-block;
  width: 26px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
}
.oval.empty {
  align-self: flex-start;   /* don't stretch to the row's height */
  margin-top: 3px;
  width: 26px;
  height: 16px;
  background: transparent;
  border: 2px solid var(--ink);
}

/* ---------- Text ---------- */
h1, h2, .ballot-title {
  font-family: var(--font-sign);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
  line-height: 1.05;
  margin: 34px 0 12px;
  max-width: 22ch;
}

.lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; margin: 0 0 22px; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0; }
.error { color: var(--error); font-weight: 650; }
.notice {
  padding: 12px 14px;
  border: 2px dashed var(--maple);
  border-radius: 4px;
  background: var(--card);
}

/* ---------- Buttons and fields: a little letterpress ---------- */
.btn {
  display: inline-block;
  background: var(--barn);
  color: #FFF8EC;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 18px;
  border-radius: 4px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 750;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  max-width: 360px;
}
.field.grow { flex: 1; max-width: none; }

select, input[type="text"] {
  font: inherit;
  font-size: 1rem;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 9px 10px;
}

:focus-visible { outline: 3px solid var(--maple); outline-offset: 2px; }

/* ---------- Homepage: filters and guide list ---------- */
.intro { margin-bottom: 30px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 24px;
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.chips, .seg { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chips-label {
  font-size: 0.8rem;
  font-weight: 750;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.chip {
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.chip.b-left { --lc: var(--ln-m2); }
.chip.b-center { --lc: var(--ln-0); }
.chip.b-right { --lc: var(--ln-p2); }
.chip[aria-pressed="true"] { border-color: var(--lc); color: var(--lc); }

.seg { margin-left: auto; border: 2px solid var(--ink); border-radius: 4px; padding: 3px; }
.seg button {
  border: 0;
  background: none;
  padding: 5px 14px;
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.count { color: var(--muted); font-size: 0.9rem; margin: 18px 2px 8px; }
.list { border-top: 2px solid var(--ink); }

.row {
  display: grid;
  grid-template-columns: 44px auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--rule);
}
.score { text-align: center; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
}
.ico svg { width: 70%; height: 70%; }
.row-main h3 { margin: 0; font-family: var(--font-sign); font-size: 1.25rem; }
.byline { margin: 2px 0 6px; color: var(--muted); font-size: 0.92rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  border: 1.5px solid var(--rule);
  color: var(--muted);
}
.tag.lean { border-color: var(--lc); color: var(--lc); }
.tag.lean::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.lc-m3 { --lc: var(--ln-m3); } .lc-m2 { --lc: var(--ln-m2); } .lc-m1 { --lc: var(--ln-m1); }
.lc-0 { --lc: var(--ln-0); }
.lc-p1 { --lc: var(--ln-p1); } .lc-p2 { --lc: var(--ln-p2); } .lc-p3 { --lc: var(--ln-p3); }

.empty-state { padding: 40px 4px; }
.empty-state h2 { margin: 0 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Make-your-guide page ---------- */
.panel {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 20px;
  margin: 24px 0 8px;
  display: grid;
  gap: 14px;
}
.panel h2 { margin: 0; font-size: 1.4rem; }

.address-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.status { margin: 0; font-weight: 650; }
.status:empty { display: none; }

/* "Where you vote", stated plainly, like the header of a ballot */
.place {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding: 14px 16px;
  border: 2px dashed var(--rule);
  border-radius: 4px;
}
.place dt {
  font-size: 0.75rem;
  font-weight: 750;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.place dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; }
.place dd.unknown { font-size: 0.95rem; font-weight: 650; color: var(--error); }
.place dd .census { display: block; margin-top: 4px; font-size: 0.8rem; font-weight: 500; color: var(--muted); }

/* A button that looks like a link */
.linkish {
  justify-self: start;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--spruce);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.place-edit { display: grid; gap: 12px; padding-top: 4px; }
.place-edit[hidden] { display: none; }

/* ---------- The ballot itself ---------- */

/* "Instructions to voters" box, as at the top of a real ballot */
.instructions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: center;
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--card);
}
.instructions h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.instructions .example { display: flex; gap: 8px; align-items: center; }
.instructions .example .logo-mark { width: 40px; height: 26px; }
.instructions p { margin: 0; }


.ballot-title { margin: 36px 0 0; font-size: 1.7rem; }

h2.group {
  margin: 30px 0 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  font-stretch: 80%;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Races sit in columns, like a paper ballot */
.race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.race {
  background: var(--card);
  border: 2px solid var(--ink);
}

.race-head {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px 9px;
}
.race-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.race-head .where { display: block; font-size: 0.85rem; opacity: 0.8; }

.limit {
  margin: 0;
  padding: 5px 12px;
  border-bottom: 2px solid var(--ink);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}

.cands { list-style: none; margin: 0; padding: 0; }
.cands li { border-bottom: 1px solid var(--rule); min-width: 0; }
.cands li:last-child { border-bottom: 0; }

/* Each candidate row is one big click target */
.pick-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  cursor: pointer;
}
.pick-label:hover { background: rgba(217, 121, 43, 0.07); }
.pick:has(input:checked) { background: #FBF1D6; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The oval: empty until marked, then scribbled in */
.oval.empty { position: relative; }
.oval.empty .logo-mark {
  position: absolute;
  left: -4px; top: -4px;
  width: 30px; height: 20px;
  visibility: hidden;
}
.pick input:checked + .oval.empty { border-color: transparent; }
.pick input:checked + .oval.empty .logo-mark { visibility: visible; }
.pick input:focus-visible + .oval.empty { outline: 3px solid var(--maple); outline-offset: 3px; }

.cand-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cands strong {
  display: block;
  font-weight: 750;
  font-stretch: 90%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.hometown { color: var(--muted); font-size: 0.85rem; margin-right: 8px; }
.party {
  flex: none;
  max-width: 45%;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.3;
  padding-top: 2px;
}
.cands a { font-size: 0.85rem; }

.writein-name {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0 0 2px;
}
.writein-name::placeholder { color: var(--muted); font-style: italic; }
.writein-name:focus { outline: none; border-bottom-color: var(--maple); box-shadow: 0 1.5px 0 var(--maple); }

.race-msg { margin: 0; padding: 0 12px; color: var(--error); font-size: 0.85rem; font-weight: 650; }
.race-msg:empty { display: none; }

/* "Why?" note for each race */
.why {
  display: block;
  padding: 10px 12px 12px;
  border-top: 2px dashed var(--rule);
}
.why-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.why-label .optional { font-weight: 500; text-transform: none; letter-spacing: 0; font-style: italic; }
.why textarea {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  padding: 7px 9px;
}
.why textarea:focus { outline: none; border-color: var(--ink); }

.ballot-foot {
  margin-top: 28px;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--card);
}
.progress { margin: 0 0 4px; font-weight: 800; font-size: 1.05rem; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .brand { font-size: 1.7rem; }
  nav a { padding: 8px 16px; font-size: 1rem; }
  .masthead { min-height: 210px; }
  .masthead .top-in { padding-top: 10px; }
  .banner .ename { font-size: 1.25rem; }
  .banner .edate { font-size: 0.95rem; }
  .stamp { font-size: 0.68rem; padding: 4px 9px; }
  .handwritten { font-size: 1.5rem; }
  .logo-mark { width: 50px; height: 33px; }
  nav { margin-left: 0; }
  .seg { margin-left: 0; }
  .banner .register { margin-left: 0; }
  .row { grid-template-columns: 36px 1fr; }
  .row .ico { display: none; }
  .race-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* =============================================================
   Sign-in, voting, publishing, and the guide page
   ============================================================= */

/* ---------- Sign in / out in the menu ---------- */
.auth-slot { display: flex; align-items: center; gap: 8px; }
.who {
  font-weight: 700;
  padding: 6px 4px 6px 10px;
  text-shadow: 0 0 8px rgba(244, 238, 223, 0.95);
}
.nav-btn {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}
.nav-btn:hover { background: var(--barn); border-color: var(--barn); }

/* ---------- The sign-in box ---------- */
.dialog {
  width: min(460px, calc(100% - 32px));
  padding: 26px;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
}
.dialog::backdrop { background: rgba(31, 28, 24, 0.45); }
.dialog form { display: grid; gap: 14px; }
.dialog h2 { margin: 0; font-size: 1.6rem; }
.dialog .field { max-width: none; }
.dialog input { width: 100%; }
.dialog .si-reason { margin: 0; font-weight: 700; color: var(--barn); }
.dialog .si-reason:empty { display: none; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
input[type="email"] {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 9px 10px;
}

/* ---------- Toast messages ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Up and down votes ---------- */
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.v {
  width: 36px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.v svg { width: 16px; height: 16px; }
.v:hover { color: var(--ink); background: rgba(217, 121, 43, 0.12); }
.v.up[aria-pressed="true"] { color: var(--spruce); background: rgba(47, 91, 68, 0.12); }
.v.down[aria-pressed="true"] { color: var(--barn); background: rgba(168, 50, 45, 0.12); }
.vote .score { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.title-link { color: var(--ink); text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-color: var(--maple); text-decoration-thickness: 2px; }

/* ---------- Sign your guide ---------- */
.sign {
  margin-top: 32px;
  padding: 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--rule);
}
.sign h2 { margin: 0 0 4px; font-size: 1.6rem; }
.sign > .hint { margin-bottom: 16px; }
.sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 20px;
}
.sign-grid .field { max-width: none; }
.sign-grid .wide { grid-column: 1 / -1; }
.sign-grid input[type="text"], .sign-grid select { width: 100%; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.sign-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.linkish.danger { color: var(--barn); }
.sign .status { margin-top: 12px; color: var(--barn); }
.sign .progress { margin: 14px 0 4px; }

/* Leaning slider: blue through purple to red */
.lean-field { gap: 8px; }
.lean-out {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 800;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: normal;
  color: var(--lc);
}
.lean-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  margin: 8px 0 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--ln-m3), var(--ln-0) 50%, var(--ln-p3));
  cursor: pointer;
}
.lean-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lc, var(--ln-0));
  border: 4px solid var(--card);
  box-shadow: 0 0 0 2px var(--ink);
}
.lean-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lc, var(--ln-0));
  border: 4px solid var(--card);
  box-shadow: 0 0 0 2px var(--ink);
}
.lean-ticks { display: flex; justify-content: space-between; font-weight: 600; }

/* Icon picker */
.icons { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 104px;
  padding: 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
  background: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.icon-opt[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--paper); }

/* ---------- One guide's page ---------- */
.back { display: inline-block; margin: 24px 0 8px; font-weight: 650; }
.g-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 3px double var(--ink);
}
.g-head h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: none; }
.ico.big { width: 84px; height: 84px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 14px; }

.race.read-only .pick-label { cursor: default; }
.race.read-only .pick-label:hover { background: none; }
.race.read-only .pick.picked { background: #FBF1D6; }
.race.read-only .pick:not(.picked) strong { font-weight: 600; color: var(--muted); }

/* A filled-in oval (on a published guide) */
.oval.filled {
  position: relative;
  align-self: flex-start;
  margin-top: 3px;
  background: transparent;
}
.oval.filled .logo-mark {
  position: absolute;
  left: -4px; top: -4px;
  width: 34px; height: 22px;
}

.why-read {
  padding: 10px 12px 12px;
  border-top: 2px dashed var(--rule);
}
.why-read p { margin: 2px 0 0; white-space: pre-wrap; line-height: 1.45; }

@media (max-width: 640px) {
  .sign-grid { grid-template-columns: 1fr; }
  .g-head { grid-template-columns: auto 1fr; }
  .g-head .ico.big { display: none; }
  .who { display: none; }
}

/* =============================================================
   Icon uploads, reports, and moderation
   ============================================================= */
.ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.icon-opt.upload { cursor: pointer; }
.icon-opt.upload:focus-within { outline: 3px solid var(--maple); outline-offset: 2px; }
.ico.blank {
  border-style: dashed;
  background: transparent;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--muted);
}
.icon-note { margin-top: 8px; text-transform: none; letter-spacing: normal; font-weight: 500; font-stretch: 100%; }
.icon-note.warn { color: var(--barn); font-weight: 650; }

.linkish.quiet { color: var(--muted); font-weight: 500; }
.reasons { display: grid; gap: 8px; }
.reason {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  cursor: pointer;
}
.reason input { width: 18px; height: 18px; accent-color: var(--barn); }
.dialog textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 8px 10px;
}

.mod-link {
  font-weight: 700;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 9px 16px;
  text-decoration: none;
}
.mod-section {
  margin: 24px 0;
  padding: 20px;
  background: var(--card);
  border: 2px solid var(--ink);
}
.mod-section h2 { margin: 0 0 14px; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.count-pill {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.mod-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mod-card { display: grid; gap: 8px; justify-items: start; padding: 12px; border: 1.5px solid var(--rule); border-radius: 6px; }
.mod-icon { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 2px solid var(--ink); }
.mod-card-text { display: grid; gap: 2px; }
.mod-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.mod-reason { margin: 6px 0; font-style: italic; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.btn.small { padding: 6px 14px; font-size: 0.95rem; }
.code {
  margin: 8px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 0.9rem;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
}
