:root {
  --purple: #522D6D;
  --purple-2: #7B3FAF;
  --orange: #FF6B00;
  --bg: #faf8fd;
  --card: #ffffff;
  --text: #2d2535;
  --muted: #8a7fa0;
  --border: #e8e0f0;
  --green: #22a06b;
  --red: #d64545;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--purple); }
.header {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff;
  padding: 40px 20px 52px;
  text-align: center;
}
.header .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.95; margin-bottom: 14px; font-weight: 700; text-decoration: none; color: #fff; }
.header .brand-logo { height: 30px; width: auto; display: block; }
@media (max-width: 480px) { .header .brand-logo { height: 24px; } .header .brand { font-size: 11px; letter-spacing: 1px; } }
.header .kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; background: rgba(255,255,255,0.16); padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; }
.header .closes {
  display: inline-block; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255,107,0,0.92); padding: 6px 16px; border-radius: 20px; margin-top: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.header .closes:empty { display: none; }
.header h1 { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.header p { font-size: 16px; opacity: 0.93; max-width: 720px; margin: 0 auto; }
.container { max-width: 900px; margin: -26px auto 40px; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 30px rgba(82,45,109,0.08);
  margin-bottom: 18px;
}
.card h2 { font-size: 18px; color: var(--purple); margin-bottom: 4px; }
.card .sub { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; justify-content: center; }
.nav a {
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; color: var(--purple);
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-ico { width: 15px; height: 15px; flex: 0 0 15px; }
.nav a:hover { border-color: var(--purple-2); }
.nav a.on { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 4px 14px rgba(255,107,0,0.35); }
.search input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--purple-2); }
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  font-family: inherit; font-size: 15px; color: var(--text); cursor: pointer; transition: all 0.12s;
}
.opt:hover { border-color: var(--purple-2); background: #fcf9ff; }
/* The row is a container, not a button: the pick area and the comment badge are two separate
   buttons, so a keyboard or a screen reader can reach both. */
.opt .opt-pick {
  display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0;
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; color: var(--text); text-align: left;
}
.opt .optmain { flex: 1 1 auto; min-width: 0; }
.opt .nm { font-weight: 600; }
.opt .by { font-size: 12px; color: var(--muted); font-weight: 500; }
.opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex: 0 0 auto; }
.opt.sel { border-color: var(--purple-2); background: #f7f1ff; box-shadow: 0 0 0 1px var(--purple-2); }
.opt.sel .radio { border-color: var(--purple-2); background: radial-gradient(circle, var(--purple-2) 45%, transparent 48%); }
.opt .cnt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
/* Comment badge: how many comments an option has, and the way into the panel. */
.cmt {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  border: 1px solid var(--border); background: #fff; border-radius: 14px;
  padding: 3px 9px; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 700; color: var(--purple); line-height: 1.2;
}
.cmt:hover { border-color: var(--orange); color: var(--orange); background: #fff8f2; }
.cmt .cmt-ico { width: 13px; height: 13px; flex: 0 0 13px; }
.bar-row .cmt { margin-left: 8px; }
/* Closing date inside the voting card. */
.close-note {
  font-size: 12.5px; font-weight: 700; color: var(--purple);
  background: #fff3e6; border: 1px solid #ffd9b8; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 14px; text-align: center;
}
.close-note:empty { display: none; }
.notice.err { color: var(--red); font-weight: 600; }
/* Comment panel. */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; background: rgba(45,37,53,0.55); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 80vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--purple), var(--purple-2));
}
.modal-head h3 { font-size: 16px; color: #fff; font-weight: 700; flex: 1; margin: 0; }
.modal-x {
  background: rgba(255,255,255,0.18); color: #fff; border: none; border-radius: 8px;
  width: 30px; height: 30px; font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit;
}
.modal-x:hover { background: rgba(255,255,255,0.32); }
.modal-body { padding: 14px 18px 20px; overflow-y: auto; }
.modal-body .cmt-count { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.cmt-item { border-left: 3px solid #f1ebf9; padding: 2px 0 2px 12px; margin-bottom: 14px; }
.cmt-item:last-child { margin-bottom: 0; }
.cmt-date { font-size: 11.5px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px; }
.cmt-text { font-size: 14px; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
/* Tool logo on every row: a rounded tile with the favicon on top of the initials fallback. */
.opt .lg {
  position: relative; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
  background: #f1ebf9; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.opt .lg i {
  font-style: normal; font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--purple); text-transform: uppercase;
}
.opt .lg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: #fff; padding: 3px;
}
.opt:hover .lg { border-color: var(--purple-2); }
.opt.sel .lg { background: #e8ddf5; border-color: var(--purple-2); }
.btn {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff; border: none; border-radius: 10px; padding: 12px 26px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--purple); border: 1px solid var(--border); }
.vote-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 14px; min-height: 70px; resize: vertical; outline: none;
}
textarea:focus { border-color: var(--purple-2); }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--purple); margin: 16px 0 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.lang {
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 20px; cursor: pointer;
  background: #fff; border: 1px solid var(--border); color: var(--purple); font-family: inherit;
}
.lang.on { background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; border-color: transparent; }
.lang.done::after { content: " \2713"; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.bar-row .lbl2 { flex: 0 0 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; background: #f1ebf9; border-radius: 6px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-2)); }
.bar-fill.mine { background: linear-gradient(90deg, var(--orange), #ffa14d); }
.bar-row .num { flex: 0 0 82px; text-align: right; font-weight: 700; color: var(--purple); font-size: 13px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: var(--purple); color: #fff; padding: 12px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 600; opacity: 0; transition: all 0.3s; z-index: 200;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2); max-width: 90vw; text-align: center;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.notice { font-size: 13.5px; color: var(--muted); text-align: center; margin: 14px 0; }
.notice.strong { color: var(--green); font-weight: 600; }
.footer { text-align: center; padding: 24px 16px 50px; color: var(--muted); font-size: 13px; }
.footer a { font-weight: 600; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--orange); background: #fff3e6; padding: 3px 10px; border-radius: 12px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
/* Explanation of the category, right under "Pick one option": darker and with more presence. */
#voteHelp { color: #4a3f5c; font-size: 15px; font-weight: 500; line-height: 1.55; }
#propSub { color: #5c5170; }
/* Suggest card: brand gradient border so it stands out from the voting cards. */
.card.propose {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, var(--purple), var(--purple-2) 45%, var(--orange)) border-box;
}
.card.propose h2::before {
  content: "";
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-2), var(--orange));
  margin-right: 9px; vertical-align: middle;
}
.prop-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.prop-grid input, .prop-grid select {
  flex: 1 1 190px; min-width: 0; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 14px; outline: none; background: #fff;
}
.prop-grid input:focus, .prop-grid select:focus { border-color: var(--purple-2); }
.prop-btn {
  flex: 0 0 auto; background: linear-gradient(135deg, var(--orange), var(--purple-2));
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.25);
}
@media (max-width: 600px) {
  .header h1 { font-size: 23px; }
  .bar-row .lbl2 { flex: 0 0 34%; }
  .bar-row .num { flex: 0 0 66px; }
  .opt .cnt { font-size: 11px; }
  .modal-box { max-height: 88vh; }
}
