:root{
  --bg:#ffffff;
  --ink:#111;
  --muted:#6b7280;
  --line:#e6e6e6;
  --brand:#2f7d32;
  --brand-dark:#256328;
  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:#f9fafb;
  color:var(--ink);
}

/* Admin breadcrumb bar (only injected for admin accounts) */
.adminbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 8px 12px;
}
.adminbar-inner{
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.adminbar a{ color: var(--brand-dark); text-decoration: none; }
.adminbar a:hover{ text-decoration: underline; }
.adminbar-label{
  font-weight: 700;
  color: var(--brand-dark);
  background: rgba(47,125,50,0.10);
  border: 1px solid rgba(47,125,50,0.18);
  padding: 2px 8px;
  border-radius: 999px;
}
.adminbar .sep{ color: rgba(0,0,0,0.35); }

/* Utility */
.muted{ color: var(--muted); }
.error{ color:#b00020; }
.ok{ color:#1b5e20; }

/* Header spacing (polish) */
header{ padding-top:24px; padding-bottom:12px; }

.toplink{ }



a{ color:var(--brand); }
a:hover{ color:var(--brand-dark); }

.small{ font-size:13px; }

/* Form stack (used on vote-request) */
.form-stack label{
  display:block;
  margin:16px 0 6px;
  font-size:14px;
  font-weight:650;
  color:#111;
}

.form-stack label:first-of-type{ margin-top:0; }

.form-stack button{ margin-top:14px; }

/* Success panel */
.success-message{
  margin-top:18px;
  padding:18px 20px;
  border-radius:14px;
  background:#f0f9f2;
  border:1px solid #cde7d1;
  color:#1f5132;
}

.success-message .success-title{
  font-size:16px;
  font-weight:700;
  margin-bottom:4px;
}

.success-message .success-text{
  font-size:14px;
  color:#2e5d3a;
}

.logo{
  display:block;
  margin: 0 auto 20px auto;
  max-width: 220px;
  height:auto;
}

.card{
  margin-top:18px;
  padding:32px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: var(--shadow);
}

.card h2{ margin:0 0 12px; font-size:22px; font-weight:800; }

.top, .topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

/* Layout */
.shell{
  min-height:100vh;
  display:grid;
  grid-template-columns: 1fr;
}

.left{
  padding: clamp(24px, 4vw, 56px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, #ffffff 0%, #f6f7f6 100%);
}

.wrap{
  width:min(560px, 100%);
}

/* Top brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:36px;
}

.brand img{
  width:204px;
  border-radius:10px;
  object-fit:contain;
  background:#fff;
	    display:block;
    margin:0 auto;
}

.brand .name{
  font-weight:800;
  letter-spacing:0.2px;
}

/* Headline */
h1{
  font-size: clamp(34px, 3.6vw, 46px);
  line-height:1.06;
  margin: 0 0 12px;
  font-weight:900;
  letter-spacing:-0.02em;
  text-align:center;
}

.sub{
  text-align:center;
  margin-left:auto;
  margin-right:auto;
  padding:0 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height:1.5;
}


/* Form */
.form{
  display:grid;
  gap:12px;
  margin-top:10px;
}

.row{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

input[type="text"],
input[type="email"]{
  width:100%;
  padding:14px 14px;
  font-size:15px;
  border:1px solid var(--line);
  border-radius:12px;
  outline:none;
  background:#fff;
}

select,
textarea{
  width:100%;
  padding:14px 14px;
  font-size:15px;
  border:1px solid var(--line);
  border-radius:12px;
  outline:none;
  background:#fff;
}

/* Make selects visually match inputs across browsers */
select{
  -webkit-appearance:none;
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right: 44px;
}

textarea{ resize:vertical; min-height:110px; }

input:focus{
  border-color: rgba(47,125,50,0.55);
  box-shadow: 0 0 0 4px rgba(47,125,50,0.12);
}

select:focus,
textarea:focus{
  border-color: rgba(47,125,50,0.55);
  box-shadow: 0 0 0 4px rgba(47,125,50,0.12);
}

.ctaRow{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:4px;
}

button{
  width:100%;
  padding:14px 16px;
  font-size:15px;
  font-weight:800;
  letter-spacing:0.02em;
  border:0;
  border-radius:12px;
  cursor:pointer;
  background: var(--brand);
  color:#fff;
}

button:hover{ background: var(--brand-dark); }
button:disabled{ opacity:.86; cursor:default; }

button.btn-secondary{
  background:#e9ecef;
  color:#111;
}
button.btn-secondary:hover{ background:#dde1e6; }

/* Anchor buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  letter-spacing:0.02em;
  background: var(--brand);
  color:#fff;
}

.btn:hover{ background: var(--brand-dark); color:#fff; }

.btn.secondary,
button.secondary{
  background:#f2f2f2;
  color:#111;
}

.btn.secondary:hover,
button.secondary:hover{
  background:#e8e8e8;
  color:#111;
}

.trust{
  margin:10px 0 0;
  font-size:13px;
  color:#5a5a5a;
}

/* Interests */
.choices{
  margin-top:18px;
  padding:14px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.choices .title{
  margin:0 0 10px;
  font-weight:800;
  color:#111;
  font-size:14px;
}

.choices label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:8px 6px;
  border-radius:10px;
  line-height:1.25;
  color:#222;
  font-size:14px;
}

.choices label:hover{
  background: rgba(0,0,0,0.03);
}

.choices input[type="checkbox"]{
  margin-top:2px;
  width:18px;
  height:18px;
  accent-color: var(--brand);
}

#msg{
  margin:12px 0 0;
  font-size:14px;
}

/* Honeypot */
.hp{
  position:absolute !important;
  left:-10000px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

/* Shared content-page helpers */
.content h1{ margin:0 0 12px; }

.page-footer{ margin-top:40px; padding-top:20px; border-top:1px solid #e3e3e3; text-align:center; }
.page-footer a{ color:#6b7280; font-weight:600; text-decoration:none; }
.page-footer a:hover{ text-decoration:underline; }

.content p{
  margin:0 0 14px;
  color: var(--muted);
  font-size:15.5px;
  line-height:1.5;
}

.box{
  background:#f4f7f4;
  border-left:6px solid var(--brand);
  padding:14px 16px;
  margin:16px 0 18px;
  border-radius:14px;
}

.actions{
  display:flex;
  flex-direction: column;
  align-items: center;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:18px;
}

a.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:14px 16px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  letter-spacing:0.02em;
}

a.button.primary{
  background: var(--brand);
  color:#fff;
}

a.button.primary:hover{
  background: var(--brand-dark);
}

a.link{
  color: var(--brand);
  text-decoration:none;
  font-weight:800;
}

a.link:hover{
  text-decoration: underline;
}

.help{
  margin:.4rem 0 0;
  font-size:13px;
  color:#5a5a5a;
}

@media (max-width:520px){
  .logo{ max-width:170px; }
  .brand img{ width:170px; }
.actions a.button{ width:100%; }
}

@media (max-width:768px){

  .brand{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  .brand img{
    display:block;
    margin:0 auto;
  }

}

.topnav{ margin-top:6px; font-size:14px; }
.topnav a{ text-decoration:underline; }


/* Admin tabs */
.tabs{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
.tab{display:inline-flex; align-items:center; padding:6px 10px; border:1px solid var(--line); border-radius:999px; text-decoration:none; font-size:13px; color:var(--ink); background:#fff;}
.tab:hover{box-shadow:0 4px 14px rgba(0,0,0,0.08);}
.tab.active, .tab[aria-current='page']{border-color: rgba(47,125,50,0.35); background: rgba(47,125,50,0.08); color: var(--brand-dark);}



/* Admin list items */
.item{ padding:14px 14px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.list{ display:grid; gap:10px; }
.topline{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.pill{ display:inline-flex; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:800; border:1px solid var(--line); }
.pill.on{ background: rgba(47,125,50,0.10); border-color: rgba(47,125,50,0.30); color: var(--brand-dark); }
.pill.off{ background: rgba(0,0,0,0.04); color:#333; }


.submit-area{ margin-top:18px; }


/* Meta row (signed-in + back/tabs) */
.meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 18px 0 14px;
}

.meta-actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.toplink{
  font-weight:700;
  text-decoration:none;
}

.toplink:hover{ text-decoration:underline; }

/* Ballot question blocks */
#questions{ display:flex; flex-direction:column; }

.qblock{
  padding:24px 0;
  border-bottom:1px solid var(--line);
}

.qblock:last-child{ border-bottom:none; }

.qblock h3{
  margin:0 0 14px;
  font-size:18px;
  font-weight:600;
  letter-spacing:-0.01em;
}

.choice{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 0;
  font-size:16px;
  cursor:pointer;
}

.choice input{
  width:18px;
  height:18px;
  accent-color: var(--brand);
}

.choice span{ line-height:1.35; }

.submit-area{
  margin-top:32px;
  padding-top:24px;
  border-top:1px solid var(--line);
}



/* ----- Guided election pages (v40) ----- */
.steps{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 6px 0 14px 0;
}
.step{
  font-size:13px;
  text-decoration:none;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
}
.step.active{
  color:#111;
  border-color:#b9d7ba;
  background:#f0f9f2;
}
.md h2, .md h3, .md h4{ margin: 14px 0 8px; }
.md p{ margin: 10px 0; }
.md ul{ margin: 10px 0 10px 18px; }
.md .sp{ height: 6px; }

.stack{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }

.mini-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  background:#fff;
}
.mini-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.mini-title{ font-weight:750; }

.btn-small{
  display:inline-block;
  padding:7px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  font-size:13px;
  color: var(--brand);
}

/* When combined with .btn (which sets color:#fff), ensure small buttons remain readable */
.btn.btn-small{ color: var(--brand); background:#fff; }
.btn.btn-small:hover{ color:#fff; background: var(--brand-dark); }

.thumb{
  width:44px;
  height:44px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid var(--line);
  background:#fff;
}

.bio-link{
  margin-left:auto;
  font-size:13px;
  text-decoration:none;
  padding:4px 8px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}
.choice{ gap:10px; }
.choice .bio-link{ margin-left:auto; }

.qhead{
  display:flex;
  align-items:center;
  gap:10px;
}
.q-resource{
  margin-left:auto;
  font-size:13px;
  text-decoration:none;
  padding:4px 8px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}

.details{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  margin-top:10px;
}
.details > summary{
  cursor:pointer;
  font-weight:700;
}
.details-body{ margin-top:10px; }

.mini-select{
  font-size:13px;
  padding:6px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
}
/* Candidate Guide Cards */

.candidate-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.candidate-card:hover {
  background: #f7f7f7;
}

.candidate-thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.candidate-text {
  flex: 1;
}

.candidate-name {
  font-weight: 600;
  font-size: 18px;
}

.candidate-why {
  color: #6b7280;
  font-size: 14px;
  margin-top: 4px;
}

.candidate-bio-btn {
  white-space: nowrap;
  padding: 8px 14px;
  font-weight: 600;
  color: #1f7a54;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background: #ffffff;
}

/* Steps alignment */

.card .steps {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.step.completed{
  color:#0b5d2a;
  border-color:#b9d7ba;
  background:#f3faf4;
}

.step.completed::before{
  content:"✓ ";
  font-weight:800;
}
.q-badge{
  margin-left:auto;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color:#0b5d2a;
  background:#f3faf4;
}
/* Ballot header */
.ballot-header{
  border-bottom:1px solid var(--line);
  padding-bottom:14px;
  margin-bottom:18px;
}
.ballot-title{
  font-weight:850;
  font-size:20px;
}
.ballot-sub{
  margin-top:2px;
  font-weight:650;
}
.ballot-meta{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}
.ballot-note{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}

/* Choice cards for ballot */
.choice-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.choice-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
}
.choice-card:hover{ background:#f7f7f7; }
.choice-card input{ flex:0 0 auto; }
.choice-text{ font-weight:650; }

.choice-card.selected{
  border-color:#b9d7ba;
  background:#f3faf4;
}

.qblock.answered{
  border-left:4px solid #b9d7ba;
  padding-left:12px;
}