:root {
  --font-primary: "Fira Sans", Arial, Helvetica, sans-serif;
  --font-select: "Raleway", "Fira Sans", Arial, Helvetica, sans-serif;
  --ta-yellow: #ffcd00;
  --ta-orange: #ffaf1d;
  --ta-yellow-soft: #fff5c4;
  --ta-yellow-pale: #fffaf0;
  --ta-black: #151515;
  --ta-charcoal: #2b2b2b;
  --ta-ink: #202020;
  --ta-muted: #6c6a64;
  --ta-line: #e8e3d8;
  --ta-paper: #ffffff;
  --ta-bg: #f8f6f1;
  --ta-danger: #a83b32;
  --ta-success: #22683b;
  --shadow: 0 18px 48px rgba(38, 31, 10, .09);
  --shadow-small: 0 8px 24px rgba(38, 31, 10, .07);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ta-ink);
  background: var(--ta-bg);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ta-black); }
button, input, textarea { font: inherit; }
select {
  font-family: var(--font-select);
  font-size: 15px;
  font-weight: 500;
}
button, .button { touch-action: manipulation; }

/* Public: consciously follows the Transactieapp yellow / black brand language. */
.public-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 205, 0, .30) 0 18%, transparent 18.5%),
    radial-gradient(circle at -5% 84%, rgba(255, 175, 29, .12) 0 18%, transparent 18.5%),
    var(--ta-bg);
}
.public-body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: -72px;
  right: -88px;
  width: 210px;
  height: 210px;
  border-radius: 42% 58% 66% 34% / 42% 36% 64% 58%;
  background: linear-gradient(135deg, var(--ta-yellow), var(--ta-orange));
  opacity: .92;
  transform: rotate(10deg);
}
.public-shell {
  width: min(100% - 28px, 580px);
  margin: 0 auto;
  padding: 22px 0 48px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--ta-black);
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 178px;
  max-width: 64vw;
  height: auto;
}
.brand-context {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px 2px;
  border: 1px solid rgba(0, 0, 0, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--ta-black);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--ta-paper);
  border: 1px solid rgba(35, 28, 3, .07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 19px 20px;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--ta-yellow), var(--ta-orange));
}
.eyebrow {
  margin: 0 0 7px;
  color: #9a7100;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
h1, h2, h3 {
  color: var(--ta-black);
  font-family: var(--font-primary);
  line-height: 1.18;
  letter-spacing: -.01em;
}
h1 { margin: 0 0 17px; font-size: clamp(29px, 7.2vw, 40px); font-weight: 700; }
h2 { margin: 0 0 14px; font-size: 25px; font-weight: 700; }
h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
p { margin: 0 0 14px; font-size: 16px; font-weight: 400; line-height: 1.65; }
.muted { color: var(--ta-muted); }
.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 15px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ta-yellow-soft);
  color: #3b2d00;
  font-size: 12px;
  font-weight: 600;
}
.poll-options { display: grid; gap: 10px; margin-top: 20px; }
.option-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 13px 14px;
  border: 2px solid #e8e4da;
  border-radius: 15px;
  background: #fff;
  color: var(--ta-black);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 2px 0 rgba(0,0,0,.02);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.option-link:hover, .option-link:focus-visible {
  border-color: var(--ta-yellow);
  box-shadow: 0 8px 24px rgba(77, 60, 0, .09);
  outline: none;
}
.option-link:active { transform: scale(.99); }
.option-link.is-current {
  border-color: var(--ta-yellow);
  background: linear-gradient(90deg, #fff9db, #fffdf4);
}
.option-emoji, .choice-emoji { font-size: 27px; line-height: 1; }
.option-copy { flex: 1; }
.option-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: none;
  border-radius: 50%;
  background: var(--ta-yellow);
  color: var(--ta-black);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.vote-note {
  margin: 16px 1px 0;
  color: var(--ta-muted);
  font-size: 12px;
  line-height: 1.45;
}
.notice {
  margin: 15px 0;
  padding: 12px 14px;
  border-radius: 13px;
  background: #fff8d8;
  border: 1px solid #f4dda0;
  color: #4d3b00;
}
.notice-warning { background: #fff3e5; border-color: #f0ceb0; color: #764518; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.button, button.button {
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid var(--ta-yellow);
  border-radius: 999px;
  background: var(--ta-yellow);
  color: var(--ta-black);
  text-decoration: none;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.button:hover, .button:focus-visible {
  background: var(--ta-orange);
  border-color: var(--ta-orange);
  box-shadow: 0 7px 20px rgba(179, 127, 0, .15);
  outline: none;
}
.button:active { transform: translateY(1px); }
.button-secondary {
  background: var(--ta-black);
  border-color: var(--ta-black);
  color: #fff;
}
.button-secondary:hover, .button-secondary:focus-visible { background: #333; border-color: #333; }
.button-ghost {
  background: #fff;
  border-color: #d9d5cb;
  color: var(--ta-black);
}
.button-ghost:hover, .button-ghost:focus-visible { background: #f7f5f0; border-color: #bdb8ad; box-shadow: none; }
.button-danger { background: var(--ta-danger); border-color: var(--ta-danger); color: #fff; }
.button-danger:hover { background: #8d3029; border-color: #8d3029; }
.button-full { width: 100%; }
.choice-box {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 18px 0;
  padding: 16px;
  border: 2px solid var(--ta-yellow);
  border-radius: 16px;
  background: linear-gradient(90deg, #fff7cf, #fffdf6);
  color: var(--ta-black);
  font-size: 18px;
  font-weight: 600;
}
.results { display: grid; gap: 18px; margin-top: 20px; }
.result-row { padding: 0; }
.result-row.is-selected .result-line { color: var(--ta-black); font-weight: 700; }
.result-line { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.result-line > span { min-width: 0; }
.result-line strong { flex: none; color: var(--ta-black); }
.bar {
  height: 11px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #ece9e1;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ta-yellow), var(--ta-orange));
}
.result-meta, .total-votes { margin-top: 5px; color: var(--ta-muted); font-size: 12px; }
.your-vote {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ta-yellow-soft);
  color: var(--ta-black);
  font-size: 9px;
  font-weight: 500;
  vertical-align: 2px;
  text-transform: uppercase;
}
.public-footer-note {
  display: flex;
  justify-content: center;
  margin: 18px auto 0;
  color: #817d72;
  font-size: 11px;
  font-weight: 500;
}
.public-footer-note strong { color: var(--ta-black); }

/* Admin */
.admin-body { min-height: 100vh; background: var(--ta-bg); }
.admin-topbar {
  background: var(--ta-black);
  color: #fff;
  border-bottom: 5px solid var(--ta-yellow);
}
.admin-topbar-inner {
  width: min(100% - 24px, 1120px);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-light { margin: 0; }
.brand-light .brand-logo { width: 170px; max-width: 48vw; }
.brand-light .brand-context {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.09);
  color: #fff;
}
.admin-nav { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.admin-nav a {
  padding: 8px 8px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
}
.admin-nav a:hover { background: rgba(255,255,255,.12); }
.admin-shell { width: min(100% - 24px, 1120px); margin: 0 auto; padding: 24px 0 50px; }
.page-head { display: flex; flex-direction: column; gap: 13px; margin-bottom: 19px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 6.5vw, 38px); font-weight: 700; }
.admin-card {
  background: #fff;
  border: 1px solid var(--ta-line);
  border-radius: 18px;
  padding: 17px;
  box-shadow: var(--shadow-small);
}
.poll-list { display: grid; gap: 12px; }
.poll-list-item {
  display: grid;
  gap: 13px;
  position: relative;
  overflow: hidden;
}
.poll-list-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--ta-yellow);
}
.poll-list-main { padding-left: 5px; }
.poll-list-main h2 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.poll-list-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--ta-muted); font-size: 13px; }
.poll-list-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.small-button { min-height: 36px; padding: 6px 11px; font-size: 12px; border-radius: 999px; }
.status-active { background: #e5f4e7; color: #225b32; }
.status-draft { background: #eeeeeb; color: #55534f; }
.status-closed { background: #f8e9e6; color: #813c35; }

.form-grid { display: grid; gap: 17px; }
.field { display: grid; gap: 6px; }
.field label, .field-label { color: var(--ta-black); font-weight: 600; font-size: 14px; line-height: 1.35; }
.field small { color: var(--ta-muted); }
input[type="text"], input[type="password"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #dedad0;
  border-radius: 12px;
  background: #fff;
  color: var(--ta-ink);
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  outline: none;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--ta-yellow);
  box-shadow: 0 0 0 4px rgba(255, 205, 0, .18);
}
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ta-yellow); flex: none; }
.option-editor { display: grid; gap: 9px; }
.option-edit-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  align-items: start;
}
.option-edit-row .emoji-input { text-align: center; font-size: 22px; padding-left: 6px; padding-right: 6px; }
.option-delete { grid-column: 1 / -1; }
.section-divider { height: 1px; background: var(--ta-line); margin: 4px 0; }
.form-actions { display: flex; gap: 9px; flex-wrap: wrap; padding-top: 4px; }
.flash { margin-bottom: 16px; padding: 12px 14px; border-radius: 13px; font-weight: 600; }
.flash-success { background: #e5f4e7; color: #225b32; border-left: 4px solid #55a36c; }
.flash-error { background: #f8e7e4; color: #843a32; border-left: 4px solid #c46358; }
.validation { margin-bottom: 16px; padding: 12px 14px; border-radius: 13px; background: #f8e7e4; color: #843a32; }
.login-shell { width: min(100%, 430px); margin: 28px auto 0; }
.login-shell .admin-card { border-top: 5px solid var(--ta-yellow); }
.share-text {
  width: 100%;
  min-height: 240px;
  padding: 13px;
  border: 2px solid var(--ta-line);
  border-radius: 12px;
  background: #fbfaf7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.link-list { display: grid; gap: 8px; }
.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--ta-line);
  border-radius: 12px;
  background: #fff;
}
.link-row code { overflow-wrap: anywhere; font-size: 12px; }
.inline-form { display: inline; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (min-width: 720px) {
  .public-shell { padding-top: 38px; }
  .brand { margin-bottom: 24px; }
  .brand-logo { width: 205px; }
  .card { padding: 31px 30px 28px; }
  .admin-shell { padding-top: 31px; }
  .page-head { flex-direction: row; justify-content: space-between; align-items: center; }
  .poll-list-item { grid-template-columns: 1fr auto; align-items: center; }
  .poll-list-actions { justify-content: flex-end; }
  .form-grid.two-col { grid-template-columns: 1fr 1fr; }
  .option-edit-row { grid-template-columns: 70px 1fr auto; align-items: center; }
  .option-delete { grid-column: auto; }
  .admin-nav a { padding: 8px 11px; font-size: 13px; }
}


/* Typography alignment with transactieapp.nl */
select {
  font-family: var(--font-select);
  font-weight: 500;
}

.button, button.button, .admin-nav a, .option-link, .pill, .field label, .field-label {
  letter-spacing: 0;
}

.muted, .vote-note, .result-meta, .total-votes, .poll-list-meta, .field small {
  font-weight: 400;
  line-height: 1.55;
}
