:root {
  color-scheme: light;
  --ink: #211842;
  --subtle: #5f5778;
  --purple: #5035bd;
  --dark-purple: #402795;
  --lavender: #f0ecff;
  --border: #e3deef;
  --white: #fff;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #f8f7fc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
a { color: var(--dark-purple); }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #785af1; outline-offset: 4px; }
.site-header {
  max-width: 1160px; margin: 0 auto; min-height: 76px; padding: 0 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid; width: 34px; height: 34px; place-items: center;
  border-radius: 10px; color: white; background: var(--purple); font-size: 19px;
}
.header-note { color: var(--subtle); font-size: .84rem; text-align: right; }
.layout {
  max-width: 1110px; padding: 64px 20px 56px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); gap: 28px;
  align-items: start;
}
.intro {
  border-radius: 25px; background: linear-gradient(158deg, #eae4ff 0%, #f1ebff 66%, #e5dbff 100%);
  padding: 35px 37px 0; min-height: 496px; overflow: hidden; position: relative;
}
.intro-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 24px; font-size: .69rem; letter-spacing: .19em; font-weight: 800; color: var(--dark-purple); }
h1 { margin: 0; font-size: clamp(3.4rem, 7.5vw, 6rem); letter-spacing: -.075em; line-height: .94; font-weight: 820; }
.title-dot { color: #6548d3; }
.intro-text { max-width: 29ch; color: #47396b; line-height: 1.55; margin: 20px 0 0; }
.ballot-art { position: absolute; right: -3px; bottom: 0; width: 260px; height: 229px; }
.orbit { border: 1px solid #b4a3ed; border-radius: 50%; position: absolute; }
.orbit-outer { inset: 18px 26px 12px 27px; }
.orbit-inner { inset: 39px 46px 32px 47px; }
.art-box {
  position: absolute; width: 134px; height: 80px; top: 118px; left: 66px;
  background: #593ec4; border-radius: 12px; border-bottom: 12px solid #432a9d;
  transform: rotate(-12deg); box-shadow: 0 10px 20px #6644a537;
}
.art-slot { position: absolute; background: #302062; width: 89px; height: 7px; top: 11px; left: 22px; border-radius: 5px; }
.art-paper {
  position: absolute; width: 78px; height: 89px; top: 45px; left: 86px;
  display: grid; place-items: center; transform: rotate(-21deg); border-radius: 10px;
  background: #faf7ff; border: 1px solid #e1d6ff; color: var(--purple);
  box-shadow: 0 7px 16px #3c26722b; font-size: 2rem; font-weight: 800;
}
.art-star { position: absolute; top: 38px; right: 43px; color: #6c4acf; font-size: 35px; }
.art-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #8467e0; bottom: 57px; left: 46px; }
.card {
  background: var(--white); min-width: 0; border: 1px solid var(--border);
  border-radius: 25px; padding: 32px; min-height: 291px; box-shadow: 0 14px 36px #3120620c;
}
.card-top { margin-bottom: 20px; }
.status {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 5px 10px;
  border-radius: 30px; background: #f1edf9; color: #53456d; font-size: .76rem; font-weight: 750;
}
.status::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.status[data-state="open"] { background: #e6f5eb; color: #14613b; }
h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.13; letter-spacing: -.05em; overflow-wrap: anywhere; }
h3 { margin: 0; font-size: 1.1rem; }
h4 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.muted { color: var(--subtle); line-height: 1.55; }
.empty { background: #f6f3fd; padding: 15px 17px; border-radius: 12px; margin: 0; }
.candidates { border: 0; padding: 0; margin: 0 0 18px; }
.candidates legend { margin-bottom: 12px; color: var(--subtle); }
.choice { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 9px; cursor: pointer; overflow-wrap: anywhere; }
.choice:hover, .choice:has(:checked) { background: #f5f1ff; border-color: #8870dd; }
.choice input { margin: 0; flex: 0 0 18px; height: 18px; accent-color: var(--purple); }
.button { min-height: 46px; cursor: pointer; font-weight: 730; border: 1px solid var(--purple); padding: 10px 15px; border-radius: 11px; background: var(--purple); color: white; }
.button:hover { background: var(--dark-purple); }
.button:disabled { opacity: .62; cursor: wait; }
.button.secondary { background: white; color: var(--dark-purple); border-color: #cfc4ec; }
.button.secondary:hover { background: var(--lavender); }
.vote-button { width: 100%; }
label.field { font-size: .89rem; font-weight: 720; display: grid; gap: 7px; margin-bottom: 14px; }
.field input, .field textarea {
  background: white; color: var(--ink); padding: 11px; border: 1px solid #cfc6e0;
  width: 100%; border-radius: 9px; font-weight: 450;
}
textarea { resize: vertical; min-height: 115px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 15px; font-size: .86rem; }
.category-panel { min-width: 0; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 15px; padding: 15px; }
.category-panel h3 { overflow-wrap: anywhere; }
.category-panel > form, .vote-receipt { margin-top: 12px; }
.category-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.category-summary p { margin: 0; flex-shrink: 0; }
.category-editor { margin-top: 18px; }
.category-editor .category-panel { background: #fbfaff; }
.category-editor .remove-category { min-height: 40px; padding: 6px 12px; font-size: .85rem; }
.results { margin: 18px 0 0; border-top: 1px solid var(--border); padding-top: 16px; }
.tally { padding: 0; list-style: none; margin: 12px 0 0; display: grid; gap: 12px; }
.tally-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.tally-item span { overflow-wrap: anywhere; min-width: 0; }
.tally-item strong { flex-shrink: 0; }
meter { width: 100%; height: 12px; accent-color: var(--purple); }
.message { padding: 11px 13px; border-radius: 9px; margin: 16px 0 0; background: #e8f6ed; color: #115831; }
.message.error { background: #ffeded; color: #8c242e; }
@media (max-width: 735px) {
  .site-header { min-height: 61px; padding-inline: 17px; }
  .layout { padding: 18px 14px 35px; grid-template-columns: 1fr; gap: 15px; }
  .intro { min-height: 231px; padding: 23px 23px 33px; }
  .eyebrow { margin-bottom: 15px; }
  h1 { font-size: clamp(3.15rem, 12vw, 4.4rem); }
  .intro-text { font-size: .94rem; position: relative; max-width: 21ch; margin-top: 13px; }
  .ballot-art { transform: scale(.53); transform-origin: bottom right; right: -4px; }
  .card { padding: 23px; min-height: 0; }
}
@media (max-width: 350px) {
  .intro { padding-inline: 17px; }
  .card { padding: 16px; }
  .ballot-art { transform: scale(.46); }
}
