:root {
  color-scheme: light;
  --ink: #141414;
  --muted: #666666;
  --paper: #f8f9f5;
  --panel: #ffffff;
  --line: #efefef;
  --sage: #d8f25d;
  --sage-deep: #86a43b;
  --brand-accent: #60b8ee;
  --brand-soft: #eff9ff;
  --brand-deep: #3188c0;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.04);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font: 800 25px/1 Manrope, sans-serif;
  letter-spacing: -1.5px;
  text-decoration: none;
}
.brand-period, .headline-period { color: var(--brand-accent); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
}
.mark-pie-base { fill: #60b8ee; }
.mark-pie-slice { fill: #ffd166; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.mark-pie-slice-warm { fill: #ff8066; }
.mark-pie-slice-green { fill: #71c99a; }
.mark-pie-slice-purple { fill: #a68ae8; }
.site-header {
  width: min(1180px, 92%);
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid #ededed;
  background: transparent;
}
.brand-group {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 20px;
}
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.header-brand {
  flex-shrink: 0;
  gap: 10px;
  font-size: 23px;
  letter-spacing: -1.2px;
}
.header-brand-mark { width: 38px; height: 38px; }
.header-headline {
  margin: 0;
  padding-left: 48px;
  color: #777;
  font-size: 12px;
  line-height: 1.4;
}
.main-navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.profile-section { width: min(1180px, 92%); min-height: 300px; margin: 0 auto; padding: 42px 0; }
.profile-greeting { margin: 0 0 20px; font: 700 18px Manrope, sans-serif; overflow-wrap: anywhere; }
.profile-heading h2, .profile-account h2 { font: 800 32px Manrope, sans-serif; }
.profile-heading h2 { margin: 8px 0 20px; }
.profile-status { color: #777; font-size: 12px; }
.profile-account { margin-top: 40px; padding-top: 24px; border-top: 1px solid #ededed; }
.profile-account[hidden] { display: none; }
.profile-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.delete-account-button { color: #a22d2d; }
.form-error { margin: 0; color: #a22d2d; font-size: 12px; }
.form-error:empty { display: none; }
.form-status { margin: 0; color: #3d6034; font-size: 12px; }
.form-status:empty { display: none; }
.sign-in-button { min-height: 42px; align-self: flex-end; white-space: nowrap; }
.sign-in-button[hidden], .account-menu[hidden] { display: none; }
a.sign-in-button { text-decoration: none; }
.navigation-create-group { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.navigation-create-actions { display: flex; align-items: center; gap: 4px; }
.account-identity {
  max-width: 220px;
  overflow: hidden;
  color: #777;
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu { position: relative; }
.account-menu-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.account-menu-button::-webkit-details-marker { display: none; }
.account-menu-button:hover, .account-menu[open] .account-menu-button { background: #eeefea; color: var(--ink); }
.account-menu-button:focus-visible, .account-menu-dropdown a:focus-visible, .account-menu-dropdown button:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.account-menu-dropdown {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  padding: 5px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
}
.account-menu-dropdown a, .account-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-menu-dropdown a:hover, .account-menu-dropdown button:hover { background: #f8f8f5; }
.account-menu-dropdown button:disabled { opacity: .6; cursor: wait; }
.admin-link { min-height: 42px; align-self: flex-end; text-decoration: none; }
.admin-link[hidden] { display: none; }
.sign-in-actions { display: flex; align-items: center; gap: 8px; }
.sign-in-options { display: grid; gap: 10px; }
.sign-in-provider {
  width: 100%;
  min-height: 48px;
  justify-content: flex-start;
  border: 1px solid #e5e5df;
  background: #fff;
  color: #353730;
  font-size: 12px;
}
.sign-in-provider:hover { background: #f8f8f5; }
.provider-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
}
.google-provider .provider-mark { color: #4285f4; background: #edf4ff; }
.email-sign-in-form { display: grid; gap: 8px; padding-top: 4px; }
.email-sign-in-form label { color: #64675f; font-size: 11px; font-weight: 700; }
.email-sign-in-form input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.email-sign-in-form input:focus { border-color: rgba(129, 168, 74, 0.8); outline: 0; box-shadow: 0 0 0 3px rgba(129, 168, 74, 0.12); }
.forgot-password-button { justify-self: end; padding: 4px 0; border: 0; color: var(--brand-deep); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.forgot-password-button:hover:not(:disabled) { text-decoration: underline; }
.forgot-password-button:disabled { opacity: .6; cursor: wait; }
.navigation-create {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
}
.button {
  min-height: 46px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button-dark {
  color: #ffffff;
  background: #1b1b1b;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}
.button-dark:hover { background: #2a2a2a; }
.button-outline {
  border: 1px solid #ececec;
  background: #fff;
  color: var(--ink);
}
.button-outline:hover { background: #fafafa; }
.button-quiet { color: #686a62; background: transparent; }
.section-kicker {
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
h2, h3, p { margin-top: 0; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.polls-section {
  width: min(1180px, 92%);
  min-height: 300px;
  margin: 0 auto;
  padding: 20px 0 42px;
}
.poll-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.sort-label {
  color: #777;
  font-size: 11px;
}
.sort-control {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #ededed;
  border-radius: 10px;
  background: #fafafa;
}
.sort-button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  color: #666;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.sort-button:hover { color: var(--ink); }
.sort-button.is-active {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sort-button:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.dialog-top h2 { margin: 7px 0 0; font: 700 24px Manrope, sans-serif; letter-spacing: -1.2px; }
.text-button, .add-option { padding: 7px 0; border: 0; color: #656c4a; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.poll-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.poll-card {
  min-width: 0;
  padding: 28px 28px 22px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  background: var(--poll-color, #ffd166);
  box-shadow: 0 10px 18px rgba(0,0,0,0.06);
}
.polls-section .poll-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.polls-section .poll-card { display: flex; flex-direction: column; padding: 18px; }
.polls-section .poll-card h3 { min-height: 0; margin-bottom: 12px; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.polls-section .mini-results { gap: 4px; }
.polls-section .mini-result-vote-row { min-height: 44px; align-content: center; }
.polls-section .poll-card-bottom { margin-top: auto; padding-top: 10px; }
.delete-poll-button { padding: 4px 0; border: 0; color: #812828; background: transparent; font: inherit; cursor: pointer; }
.delete-poll-button:hover { text-decoration: underline; }
.poll-card h3 {
  min-height: 54px;
  margin-bottom: 18px;
  font: 700 22px/1.4 Manrope, sans-serif;
  letter-spacing: -0.02em;
}
.poll-card h3,
.poll-card .mini-result,
.poll-card .poll-card-bottom { color: rgba(30, 31, 28, 0.82); }
.poll-card .poll-option-vote {
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.82);
}
.poll-card .poll-option-vote:hover:not(:disabled) {
  border-color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.94);
}
.poll-card .result-track { background: rgba(255,255,255,.48); }
.mini-results { display: grid; gap: 8px; }
.mini-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  color: #615f5b;
  font-size: 12px;
}
.mini-result.is-unvoted { display: grid; }
.mini-result-vote-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  padding: 0 0 6px;
  border: 0;
  color: rgba(30, 31, 28, 0.82);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mini-result-vote-row:disabled { cursor: wait; opacity: .6; }
.mini-result span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-result .is-winner { color: rgba(30, 31, 28, 0.82); font-weight: 400; }
.poll-option-vote {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px 12px;
  border: 1px solid #e4e6de;
  border-radius: 9px;
  color: #3d3d3a;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.poll-option-vote .result-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 0 0 8px 8px;
}
.poll-option-vote:hover:not(:disabled) { border-color: var(--brand-accent); background: #f7f9f1; }
.poll-option-vote:focus-visible { outline: 3px solid rgba(85, 127, 194, .35); outline-offset: 2px; }
.poll-option-vote:disabled { cursor: wait; opacity: .6; }
.poll-option-vote span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-option-vote .is-winner { color: rgba(30, 31, 28, 0.82); font-weight: 400; }
.poll-card .mini-result,
.poll-card .poll-option-vote,
.poll-card .poll-option-vote span,
.poll-card .mini-result span { color: rgba(30, 31, 28, 0.82); }
.result-track {
  height: 7px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0,0,0,0.04);
}
.result-fill {
  height: 100%;
  border-radius: inherit;
  background: #3d4038;
}
.mini-result:nth-child(n) .result-fill { background: #3d4038; }
.poll-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  color: #848781;
  font-size: 11px;
  font-weight: 600;
}
.poll-menu { position: relative; margin-left: auto; }
.poll-menu-details { position: relative; }
.poll-menu-button {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #777970;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}
.poll-menu-button::-webkit-details-marker { display: none; }
.poll-menu-details[open] .poll-menu-button,
.poll-menu-button:hover { border-color: #e8e8e2; background: #fafaf8; color: #40413e; }
.poll-menu-dropdown {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 140px;
  padding: 5px;
  border: 1px solid #e8e8e2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.report-poll-button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: #8a625b;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.report-poll-button:hover:not(:disabled) { color: #a22b24; background: #fff3f1; }
.report-poll-button:disabled { color: #999; cursor: default; }
.polls-loading, .polls-error { padding: 30px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.polls-error { color: #9a5141; }
.vote-button {
  padding: 0;
  border: 0;
  color: var(--brand-deep);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.vote-button:hover { text-decoration: underline; }
.option-suggestions .vote-button { color: rgba(30, 31, 28, 0.82); }
.option-suggestions { margin-top: 10px; }
.suggestion-form { display: flex; gap: 8px; margin-bottom: 8px; }
.suggestion-form input {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e7e5df;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
}
.suggestion-submit { min-height: 34px; padding: 0 11px; font-size: 10px; }
.empty-state { display: none; padding: 33px 20px 42px; text-align: center; }
.empty-state.is-visible { display: block; }
.empty-illustration {
  width: 66px;
  height: 66px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f2f7e2, #ffffff);
}
.empty-illustration span { font: 800 30px Manrope, sans-serif; color: #728d43; }
.empty-illustration i {
  position: absolute;
  top: 2px;
  right: -2px;
  color: #e59a70;
  font-size: 19px;
  font-style: normal;
}
.empty-state h3 { margin-bottom: 6px; font: 700 18px Manrope, sans-serif; }
.empty-state p { max-width: 360px; margin: 0 auto 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-state .button { min-height: 39px; font-size: 11px; }
.footer {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #ededed;
  color: #666;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #919191;
  font-size: 10px;
}
.feedback-button {
  padding: 0;
  border: 0;
  color: #919191;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.feedback-button:hover { color: #607c35; text-decoration: underline; }
.poll-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 25px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 32px 80px rgba(0,0,0,0.14);
}
.poll-dialog::backdrop { background: rgba(17, 16, 15, 0.20); backdrop-filter: blur(3px); }
.dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dialog-top h2 { font-size: 24px; }
.icon-button {
  width: 31px;
  height: 31px;
  border: 1px solid #ebebeb;
  border-radius: 50%;
  background: #fff;
  color: #777970;
  font-size: 21px;
  cursor: pointer;
}
.field-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
textarea, .option-input-row input { width: 100%; border: 1px solid #ddd; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); }
textarea {
  min-height: 80px;
  padding: 11px 12px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.5;
}
textarea:focus, .option-input-row input:focus {
  border-color: rgba(129, 168, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(129, 168, 74, 0.12);
}
textarea::placeholder, input::placeholder { color: #a7a29a; }
.field-hint { display: flex; justify-content: space-between; margin-top: 5px; color: #999b91; font-size: 9px; }
.options-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; }
.options-heading .field-label { margin: 0; }
.options-heading .field-hint { margin: 0; }
.option-inputs { display: grid; gap: 7px; margin-top: 9px; }
.option-input-row { display: flex; align-items: center; gap: 8px; }
.option-number { width: 21px; color: #96988d; text-align: center; font-size: 10px; }
.option-input-row input { height: 38px; padding: 0 10px; font-size: 11px; }
.settings-checkbox { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #3d3d3a; font-size: 11px; }
.settings-checkbox input { accent-color: var(--brand-accent); }
.add-option { margin: 8px 0 0 28px; color: #697645; font-size: 10px; }
.add-option:disabled { color: #b2b3ac; cursor: not-allowed; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.dialog-actions .button { min-height: 39px; font-size: 11px; }
.dialog-description { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.report-reasons { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; border: 0; }
.report-reasons legend { margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.report-reasons label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #efeee9;
  font-size: 12px;
  cursor: pointer;
}
.report-reasons label:last-of-type { border-bottom: 0; }
.report-reasons label:has(input:checked) { color: #607c35; }
.report-reasons input { accent-color: var(--brand-accent); }
.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 23, 23, 0.95);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .polls-section .poll-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .site-header { min-height: 68px; flex-wrap: wrap; gap: 12px 0; padding: 12px 0; }
  .brand-group { gap: 12px; }
  .header-headline { padding-left: 0; font-size: 11px; }
  .navigation-create { min-height: 38px; padding-inline: 12px; }
  .sign-in-actions { width: 100%; order: 3; }
  .sign-in-actions .sign-in-button { flex: 1; font-size: 10px; }
  .polls-section { padding-top: 16px; }
  .polls-section .poll-list { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .header-brand { gap: 6px; font-size: 17px; }
  .header-brand-mark { width: 30px; height: 30px; }
  .brand-group { gap: 8px; }
  .header-headline { max-width: 125px; padding-left: 0; font-size: 10px; }
  .navigation-create { min-height: 36px; padding-inline: 9px; font-size: 10px; }
  .hero-actions { flex-wrap: wrap; }
  .poll-list { grid-template-columns: 1fr; }
  .poll-card { padding: 20px; }
  .polls-section { width: 90%; }
  .footer-bottom { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.poll-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 0; }
.poll-card-header h3 { min-width: 0; }
