@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-400-700.woff2") format("woff2");
  font-weight: 400 700;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-latin-600-700.woff2") format("woff2");
  font-weight: 600 700;
}
:root {
  --green: #23463a;
  --green-dark: #12362e;
  --text: #23272b;
  --gold: #c6a15b;
  --paper: #f1f1ef;
  --line: rgba(35, 39, 43, .12);
  --shadow: 0 18px 50px rgba(35, 39, 43, .12);
  --container: min(1180px, calc(100% - 36px));
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0%, #f7f6f2 100%);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { min-height: calc(100vh - 170px); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: var(--container);
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; color: var(--green); }
.brand img {
  /* width: clamp(260px, 34vw, 430px); */
  height: auto;
  max-height: 78px;
  object-fit: contain;
}
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 22px; font-size: 14px; font-weight: 700; }
nav a:hover, .back-link:hover { color: var(--green); }
.hero {
  min-height: 360px;
  display: grid;
  align-items: center;
  padding: 70px clamp(20px, 7vw, 90px);
  background:
    linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.78) 48%, rgba(255,255,255,.22) 100%),
    url("../img/city-management.webp") center/cover no-repeat;
}
.hero > div, .content-band, .poll-detail { width: var(--container); margin: 0 auto; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; color: var(--green-dark); line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(36px, 6vw, 70px); }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: 24px; }
.lead { max-width: 640px; margin: 18px 0 0; font-size: 18px; }
.lead.small { max-width: 780px; font-size: 16px; }
.content-band { padding: 46px 0 70px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 24px; }
.section-title p { margin: 8px 0 0; }
.poll-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.poll-card, .panel, .admin-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.poll-card { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.poll-card:hover { transform: translateY(-3px); box-shadow: 0 22px 60px rgba(35, 39, 43, .16); }
.poll-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper); }
.badge, .status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.badge { position: absolute; top: 12px; left: 12px; }
.poll-card-body { padding: 20px; }
.poll-card-body p { min-height: 48px; margin: 10px 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; color: rgba(35, 39, 43, .72); font-size: 13px; }
.panel { padding: clamp(24px, 4vw, 38px); }
.panel.narrow { width: min(520px, calc(100% - 36px)); margin: 54px auto; }
.poll-detail { padding: 42px 0 70px; }
.back-link { display: inline-block; margin-bottom: 18px; color: rgba(35,39,43,.72); font-size: 14px; font-weight: 700; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  margin-top:20px;
  font: 800 14px/1 "Inter", Arial, sans-serif;
  cursor: pointer;
}
.button.secondary { border-color: var(--gold); background: var(--gold); }
.button:hover { filter: brightness(.96); }
.form { display: grid; gap: 18px; margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  font: 400 15px/1.4 "Inter", Arial, sans-serif;
}
textarea { resize: vertical; }
.current-image {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}
.current-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.image-path {
  margin: 8px 0 0;
  color: rgba(35, 39, 43, .68);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.form-error { margin: 12px 0 0; padding: 12px 14px; border-radius: 6px; background: #fff1f1; color: #8f1f1f; font-weight: 700; }
.flash { width: var(--container); margin: 18px auto 0; padding: 13px 16px; border-radius: 6px; background: #e7f5ec; color: var(--green); font-weight: 800; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}
.choice input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.choice span { font-weight: 700; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
  color: rgba(35, 39, 43, .82);
  font-size: 14px;
  font-weight: 400;
}
.consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--green);
}
.consent a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vote-form h2 { margin: 24px 0 16px; font-size: clamp(24px, 3vw, 34px); }
.result-total { margin: 22px 0; font-weight: 800; color: var(--green); }
.result-list { display: grid; gap: 18px; }
.result-label { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 7px; font-weight: 800; }
.bar { height: 10px; overflow: hidden; border-radius: 999px; background: #ebe9e5; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); }
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { color: var(--green); font-size: 12px; text-transform: uppercase; }
.admin-table small { color: rgba(35,39,43,.68); }
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  white-space: nowrap;
}
.actions a,
.actions button {
  color: var(--green);
  font: 800 14px/1 "Inter", Arial, sans-serif;
}
.actions form {
  display: inline;
  margin: 0;
}
.actions button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.status.draft { background: #8c8c85; }
.status.inactive { background: #23272b; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,.7); }
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
  padding: 28px 18px;
  border-top: 1px solid var(--line);
  color: rgba(35,39,43,.68);
  font-size: 14px;
}
.footer a { color: var(--green); font-weight: 800; }
@media (max-width: 860px) {
  .poll-grid, .form-grid { grid-template-columns: 1fr; }
  .current-image { grid-template-columns: 1fr; }
  .section-title { align-items: start; flex-direction: column; }
  nav { font-size: 13px; gap: 10px; }
  .hero { min-height: 320px; padding-top: 50px; padding-bottom: 50px; }
}
@media (max-width: 560px) {
  .site-header { padding: 14px 0; }
  .topbar { width: min(100% - 28px, 1180px); }
  .topbar { gap: 12px; }
  .brand img { width: min(230px, 58vw); max-height: 58px; }
  .poll-detail, .content-band { width: min(100% - 28px, 1180px); }
  .panel { padding: 22px; }
  h1 { font-size: 38px; }
}
