* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.site-header {
  background: #1a1a2e;
  padding: 10px 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

.logo {
  height: 36px;
  display: block;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.layout {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  align-items: flex-start;
  padding: 40px 16px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  min-width: 48px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: opacity 0.2s;
  text-decoration: none;
}

.share-btn:hover {
  opacity: 0.8;
}

.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.viber    { background: #7360f2; color: #fff; }
.share-btn.email    { background: #555; color: #fff; }

.share-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Main content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Progress header */
.progress-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.progress-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.question-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.nav-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #333;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}

.nav-btn:hover {
  background: #eee;
}

.nav-btn.answered {
  background: #e8f0fe;
  border-color: #aac4f7;
  color: #1a56d6;
}

.nav-btn.current {
  background: #1a56d6;
  border-color: #1a56d6;
  color: #fff;
  font-weight: 700;
}

/* Question block + animation */
@keyframes question-in {
  0%   { opacity: 0; transform: translateY(16px) scale(0.98); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.question-block {
  display: flex;
  flex-direction: column;
}

.question-block.animate {
  animation: question-in 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Question card */
.question-card {
  background: #ebebeb;
  border-radius: 8px;
  padding: 32px 28px;
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.4;
  color: #111;
  min-height: 120px;
}

/* Answer options */
.answers {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.answer-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  font-size: 20px;
  color: #111;
  text-align: left;
  transition: background 0.15s;
  width: 100%;
}

.answer-btn:first-child {
  border-top: 1px solid #e0e0e0;
}

.answer-btn:hover {
  background: #f0f0f0;
}

.answer-btn.selected {
  background: #e8f0fe;
  border-color: #aac4f7;
}

.answer-btn.selected:hover {
  background: #dce7fd;
}

.answer-btn .emoji {
  font-size: 26px;
  flex-shrink: 0;
  width: 34px;
  text-align: center;
}


/* Compass */
.compass-svg {
  margin-top: 8px;
  max-width: 600px;
}

.compass-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 18px;
  color: #444;
}

.compass-caption {
  margin-top: 14px;
  font-size: 20px;
  color: #555;
  line-height: 1.5;
  font-style: italic;
}

/* Instruction */
.instruction {
  margin-top: 20px;
  font-size: 16px;
  color: #666;
  line-height: 1.5;
  font-style: italic;
}

.instruction a {
  color: #1a56d6;
  text-decoration: underline;
}

/* Important checkbox */
.important-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 12px 4px;
}

.important-row input[type="checkbox"] {
  width: 26px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}

.important-row label {
  font-size: 20px;
  color: #333;
  cursor: pointer;
}

/* Results screen */
.results {
  flex-direction: column;
  gap: 28px;
  padding: 8px 0;
}

.results h2 {
  font-size: 32px;
  font-weight: 700;
  color: #111;
}

.results-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.results-section h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}

/* Party matches */
.party-matches {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.party-match {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.party-header {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.party-name { font-weight: 700; font-size: 22px; }
.party-pct  { font-weight: 700; font-size: 22px; color: #111; }

.party-description {
  margin-top: 12px;
  font-size: 17px;
  color: #444;
  line-height: 1.6;
}

.party-bar-wrap {
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
}

.party-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}

/* Axes */
.axes-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.axis-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.axis-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  overflow: visible;
}

.axis-gradient {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.axis-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: #fff;
  border: 3px solid #333;
  border-radius: 50%;
}

.axis-pcts {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}

.share-row {
  display: flex;
  gap: 10px;
}

.share-btn.twitter { background: #000; color: #fff; }

.copy-row button {
  padding: 10px 24px;
  background: #1a56d6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-row button:hover {
  background: #1244b0;
}

.restart-btn {
  align-self: flex-start;
  padding: 10px 28px;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.restart-btn:hover {
  background: #f0f0f0;
}

@media (max-width: 600px) {
  .layout {
    flex-direction: column-reverse;
  }

  .sidebar {
    flex-direction: row;
    justify-content: center;
    min-width: unset;
    padding-top: 0;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
  }

  .share-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 0;
  }

  .question-card { font-size: 20px; padding: 24px 16px; }
  .answer-btn { font-size: 17px; }
  .progress-title { font-size: 18px; }

  .compass-svg { margin-top: 0; }
  .results-section { gap: 6px; }
}
