:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --ink: #0f172a;
  --muted: #4b5563;
  --border: #d9e2ef;
  --accent: #111827;
  --accent-strong: #0b1221;
  --highlight: #2563eb;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(17, 24, 39, 0.12), transparent 28%),
    var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4, strong {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 6px;
}

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

.meta-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand .eyebrow {
  margin-bottom: 0;
}

.brand sup {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: text-top;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, var(--accent) 30%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  padding: 8px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f8fafc;
  border-color: var(--accent-strong);
  box-shadow: var(--shadow);
}

.primary-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.leader-btn {
  background: linear-gradient(135deg, #111827, #0b1221);
  border-color: #0b1221;
  color: #f8fafc;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

.leader-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}

.ghost-btn {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.ghost-btn:hover {
  border-color: var(--border);
  background: var(--surface-alt);
  text-decoration: none;
}

.all-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  font-weight: 700;
  gap: 8px;
}

.all-btn:hover {
  border-color: var(--highlight);
  color: var(--highlight);
}

.back-arrow {
  display: inline-block;
  font-weight: 800;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}

.intro {
  padding: 10px 0 18px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}

.intro h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.logo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-alt));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.logo-banner.tight {
  gap: 10px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}

.bullet-list {
  padding-left: 18px;
  margin: 8px 0 12px;
  color: var(--muted);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.surveys {
  margin-top: 8px;
}

.survey-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.survey-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.survey-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.leader-list .survey-card {
  border: 1px solid var(--border);
}

.leader-list .survey-card.active {
  border-color: var(--highlight);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.leader-survey-card .pill {
  margin: 6px 0;
}

.small-btn {
  padding: 9px 12px;
  border-radius: 10px;
}

.survey-card h3 {
  margin: 0;
}

.survey-body {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.survey-body.single-column {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-alt);
}

.question h4 {
  margin: 0 0 10px;
  font-weight: 700;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.option:hover {
  background: rgba(37, 99, 235, 0.06);
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--highlight);
}

.option + .other-option {
  margin-top: 8px;
}

.other-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.other-input {
  flex: 1 1 240px;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

.error-text {
  color: #b42318;
  font-weight: 700;
  margin: 6px 0;
  min-height: 18px;
}

.results-card {
  min-height: 220px;
}

.results {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.result-question {
  margin: 12px 0;
}

.bar {
  height: 9px;
  background: #e1e8f5;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(135deg, var(--highlight), #0ea5e9);
  border-radius: 8px;
  transition: width 0.4s ease;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.question-header h4 {
  margin: 2px 0 0;
  font-size: 16px;
}

.question-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-track {
  height: 9px;
  background: #e1e8f5;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.bar-track .bar-fill {
  position: absolute;
  inset: 0;
}

.leader-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 12px 0 50px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.leader-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.mini-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inline-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  font-weight: 600;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field input,
.field select {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--highlight);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.pill-btn:hover {
  transform: translateY(-1px);
  border-color: var(--highlight);
}

.pill-btn.active {
  background: linear-gradient(135deg, var(--highlight), #1d4ed8);
  color: #f8fafc;
  border-color: #1d4ed8;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.stat-card h4 {
  margin: 4px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  font-weight: 700;
}

.pill.small {
  padding: 4px 10px;
  font-size: 13px;
}

.soft-badge {
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px dashed var(--border);
  background: var(--surface-alt);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.other-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.other-btn:hover {
  background: var(--surface-alt);
  border-color: var(--highlight);
  transform: translateY(-1px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  max-width: 720px;
  width: min(100%, 720px);
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 56px rgba(15, 23, 42, 0.25);
}

.other-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.other-list li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
}

.danger-btn {
  border-color: var(--border);
  color: #b42318;
}

.danger-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

@media (max-width: 960px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
  .survey-body {
    grid-template-columns: 1fr;
  }
  .detail-shell {
    grid-template-columns: 1fr;
  }
  .filter-card {
    position: static;
  }
  .survey-body.single-column {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .site-header {
    position: sticky;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .summary-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 14px 12px 48px;
  }
  .site-header {
    padding: 12px;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .logo-banner {
    flex-direction: row;
    align-items: flex-start;
  }
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-panel,
  .survey-card {
    gap: 8px;
  }
  .bullet-list {
    margin: 4px 0 10px;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 540px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
  }
  .brand {
    width: 100%;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
    padding: 6px;
  }
  .top-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .top-nav a,
  .top-nav button,
  .top-nav .primary-btn {
    width: 100%;
    justify-content: center;
  }
  .all-btn {
    justify-content: center;
  }
  .hero-logo {
    width: 64px;
    height: 64px;
  }
}
.detail-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  align-items: start;
}

.filter-card {
  position: sticky;
  top: 80px;
  align-self: start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.filter-card h4 {
  margin: 0 0 6px;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.filter-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
}

.filter-checks .checkbox {
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.filter-checks .checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-actions button {
  flex: 1;
}

.bar-label span:first-child {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.bar-label span:last-child {
  white-space: nowrap;
  margin-left: 8px;
}
