:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5b6472;
  --line: #e5e7eb;
  --primary: #111827;
  --accent: #2563eb;
  --success-soft: #f3f4f6;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.05;
}

.hero-text {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 820px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  margin-bottom: 12px;
}

.support-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.info-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-body {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.search-section {
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.autocomplete-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 520px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
}

.search-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.autocomplete-list.hidden {
  display: none;
}

.autocomplete-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

.autocomplete-item:last-child {
  border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #f8fafc;
}

.autocomplete-name {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.autocomplete-meta {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.autocomplete-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
}

.results {
  margin-bottom: 26px;
}

.result-card,
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.result-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-meta,
.result-id,
.profile-meta {
  color: var(--muted);
  margin-bottom: 8px;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.profile-card h2 {
  margin: 0 0 6px;
  font-size: 34px;
}

.section {
  margin-top: 28px;
}

.section h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.section-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.subsection {
  margin-top: 18px;
}

.subsection h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.vote-box {
  padding: 16px;
  border-radius: 12px;
  border-left: 6px solid #6b7280;
  background: var(--success-soft);
}

.vote-box.muted {
  color: #374151;
}

.vote-for {
  border-left-color: #15803d;
  background: #f0fdf4;
}

.vote-against {
  border-left-color: #b91c1c;
  background: #fef2f2;
}

.vote-neutral {
  border-left-color: #6b7280;
  background: #f3f4f6;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-label {
  font-weight: 700;
}

.metric-value {
  color: var(--muted);
  text-align: right;
}

.vote-row,
.interest-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.vote-row:last-child,
.interest-row:last-child {
  border-bottom: 0;
}

.interest-group-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.interest-group-card h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.interest-category {
  font-weight: 700;
  margin-bottom: 6px;
}

.interest-summary {
  color: #1f2937;
  line-height: 1.55;
}

.interest-date {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.message {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.message.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.muted-message {
  color: var(--muted);
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 860px) {
  .info-strip {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }

  .profile-card h2 {
    font-size: 28px;
  }

  .metric-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-value {
    text-align: left;
  }
}