:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f3f6f8;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --brand: #0f766e;
  --brand-2: #2563eb;
  --brand-hover: #115e59;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --danger: #ef4444;
  --ok: #166534;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 10px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 700;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 10px clamp(20px, 5vw, 60px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: white;
  font-size: 0.95rem;
  letter-spacing: 0;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.24);
}

.brand small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-top: 1px;
}

.nav {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.nav a,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

button:hover, .nav a:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
  transform: translateY(-1px);
}

.nav a.secondary,
.button.secondary,
button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav a.secondary:hover,
.button.secondary:hover,
button.secondary:hover {
  background: var(--panel-soft);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.eyebrow,
.poll-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 4px 14px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.poll-kicker.warm {
  background: var(--accent-soft);
  color: #c2410c;
}

.section-head {
  display: block;
  margin: 0 0 28px;
  text-align: left;
}

.section-head p.muted {
  font-size: 1.15rem;
  max-width: 600px;
  line-height: 1.6;
}

.headline-copy {
  min-width: 0;
}

.poll-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.poll-stats div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.poll-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.poll-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-head.compact {
  margin-top: 0;
  text-align: left;
  align-items: flex-start;
  margin-bottom: 24px;
}

.poll-bottom-tools {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.poll-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button.filter-tab {
  min-height: 38px;
  border-color: var(--line);
  padding: 8px 13px;
  background: white;
  color: var(--ink);
  box-shadow: none;
}

button.filter-tab:hover,
button.filter-tab.active {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-hover);
  box-shadow: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 28px;
  align-items: start;
}

.poll-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.poll-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.poll-card {
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

.poll-card.featured {
  border-top: 4px solid var(--accent);
}

.poll-title-link {
  color: inherit;
  text-decoration: none;
}

.poll-title-link:hover {
  color: var(--brand-hover);
}

.poll-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.poll-kickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.poll-kickers .poll-kicker {
  margin-bottom: 0;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 12px;
  background: #dcfce7;
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.badge.closed {
  background: #fee2e2;
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.poll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.5);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.poll-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.poll-meta span + span::before {
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
}

.options {
  display: grid;
  gap: 0;
}

.option {
  display: grid;
  gap: 14px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.2s ease;
}

.option:hover {
  background: rgba(248, 250, 252, 0.8);
}

.option:last-child {
  border-bottom: 0;
}

.option-row,
.option-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-label {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.option-label .option-index {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 800;
}

.option-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--panel-soft);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 2px solid white;
}

.option-label strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  font-weight: 600;
}

.top-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-value {
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand);
}

.choice {
  min-height: 40px;
  padding: 8px 20px;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.choice:hover {
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.24);
}

.bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

@keyframes fillBar {
  from { max-width: 0; }
  to { max-width: 100%; }
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.22);
  animation: fillBar 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.option-footer {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.poll-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 28px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.poll-link-button,
.copy-link {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  font-size: 0.9rem;
}

.poll-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.poll-link-button:hover {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--brand-hover);
}

.no-results {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.no-results strong,
.no-results span {
  display: block;
}

.no-results strong {
  margin-bottom: 8px;
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(420px, calc(100% - 48px));
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  font-weight: 500;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast:empty {
  display: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.panel {
  padding: 32px;
}

.form {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: white;
  color: var(--ink);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.order-button {
  min-width: 68px;
}

.table-list {
  display: grid;
  gap: 16px;
}

.admin-row {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  transition: border-color 0.2s, background 0.2s;
}

.admin-row:hover {
  border-color: var(--line-strong);
  background: rgba(241, 245, 249, 0.8);
}

.poll-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  margin-right: 8px;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--brand);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 800;
  vertical-align: middle;
}

.admin-option-row input:focus {
  border-color: var(--brand);
  background: white;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .seo-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .section-head {
    text-align: left;
  }

  .poll-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .poll-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 460px) {
  .topbar {
    min-height: 60px;
    padding: 10px 16px;
  }

  .brand {
    gap: 10px;
    font-size: 1rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav a,
  .button,
  button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .nav a {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: 2rem;
  }

  .shell {
    width: min(100% - 24px, 1200px);
    padding-top: 16px;
  }
  
  .poll-head {
    padding: 20px 16px 16px;
  }

  .poll-meta {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .poll-meta span + span::before {
    display: none;
  }

  .poll-actions {
    padding: 14px 16px 18px;
  }

  .poll-link-button,
  .copy-link {
    flex: 1 1 100%;
  }

  .poll-stats {
    grid-template-columns: 1fr 1fr;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .option {
    padding: 16px;
    gap: 10px;
  }

  .option-label .option-index {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .option-avatar {
    width: 32px;
    height: 32px;
  }

  .option-label strong {
    font-size: 0.95rem;
  }
  
  .result-value {
    font-size: 1rem;
  }

  .option-row,
  .option-footer {
    align-items: flex-start;
  }

  .option-footer {
    flex-direction: column;
    gap: 10px;
  }

  .choice {
    width: 100%;
    min-height: 38px;
  }
  
  .panel {
    padding: 16px;
  }

  .seo-content {
    margin-top: 28px;
    padding: 18px;
  }

  .popular-searches {
    justify-content: flex-start;
  }

  .popular-searches a {
    flex: 1 1 150px;
    justify-content: center;
    text-align: center;
  }
  
  .admin-row {
    padding: 16px;
    gap: 12px;
  }

  .form {
    gap: 16px;
  }

  input, textarea, select {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}

.site-footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 20px;
}

.site-footer a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.social-link {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  color: white;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.social-link.social-facebook {
  background: #1877f2;
}

.social-link.social-facebook:hover {
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.social-link.social-instagram {
  background: #d62976;
}

.social-link.social-tiktok {
  background: #000000;
}

.social-link.social-tiktok:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.social-link.social-coming-soon {
  opacity: 0.45;
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  cursor: default;
  box-shadow: none;
}

.social-link:hover:not(.social-coming-soon) {
  transform: translateY(-2px) scale(1.1);
  text-decoration: none;
}

.social-link.social-coming-soon:hover {
  transform: none;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  animation: slideUp 0.6s ease;
}

.empty-state svg {
  width: 72px;
  height: 72px;
  color: var(--line-strong);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.seo-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  margin-top: 44px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.seo-content h2 {
  margin-bottom: 12px;
  font-size: 1.75rem;
}

.seo-content p {
  color: var(--muted);
  line-height: 1.65;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 14px 16px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.faq-list p {
  margin: 10px 0 0;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 0;
}

.popular-searches a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.popular-searches a:hover,
.popular-searches a[aria-current="page"] {
  border-color: var(--brand);
  color: var(--brand-hover);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: white;
  padding: 16px 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.cookie-text a {
  color: var(--brand);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 20px;
  }
}

@media (max-width: 900px) {
  .seo-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .seo-content {
    margin-top: 28px;
    padding: 18px;
  }

  .popular-searches {
    justify-content: flex-start;
  }

  .popular-searches a {
    flex: 1 1 150px;
    justify-content: center;
    text-align: center;
  }

  .social-links {
    gap: 10px;
    margin-top: 14px;
  }

  .social-link {
    width: 32px;
    height: 32px;
  }

  .social-icon {
    width: 16px;
    height: 16px;
  }
}
