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

:root {
  --blue: #3b82f6;
  --green: #22c55e;
  --red: #ef4444;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ── Landing ─────────────────────────────────────────── */

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.landing-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.landing-card h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.landing-card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.meta-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.meta-list li::before {
  content: "• ";
}

/* ── Buttons ─────────────────────────────────────────── */

.btn-start,
.btn-submit {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-start:hover,
.btn-submit:hover {
  background: #2563eb;
}

/* ── Sticky progress bar ─────────────────────────────── */

.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* ── Quiz layout ─────────────────────────────────────── */

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.quiz-container > h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.category-section {
  margin-bottom: 2.5rem;
}

.category-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.question-text {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* ── Slider ──────────────────────────────────────────── */

.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--red) 0%,
    var(--border) 50%,
    var(--green) 100%
  );
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid #9ca3af;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  border-color: var(--blue);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid #9ca3af;
  cursor: pointer;
}

.slider-labels {
  position: relative;
  height: 1.3em;
  font-size: 0.68rem;
  color: var(--muted);
}

.slider-labels span {
  position: absolute;
  white-space: nowrap;
  transform: translateX(-50%);
}

.slider-labels span:nth-child(1) {
  left: 0;
  transform: translateX(0);
}
.slider-labels span:nth-child(2) {
  left: calc(25% + 4.5px);
}
.slider-labels span:nth-child(3) {
  left: 50%;
}
.slider-labels span:nth-child(4) {
  left: calc(75% - 4.5px);
}
.slider-labels span:nth-child(5) {
  left: 100%;
  transform: translateX(-100%);
}

.slider-value {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 480px) {
  .slider-labels {
    height: 2.6em;
    font-size: 0.62rem;
  }

  .slider-labels span {
    white-space: normal;
    max-width: 4.8em;
    line-height: 1.2;
  }

  .slider-labels span:nth-child(5) {
    text-align: right;
  }
}

.slider-value.positive {
  color: var(--red);
}
.slider-value.negative {
  color: var(--blue);
}
.slider-value.neutral {
  color: var(--muted);
}

/* ── Submit row ──────────────────────────────────────── */

.submit-row {
  text-align: center;
  margin-top: 2rem;
}

/* ── Results ─────────────────────────────────────────── */

.results-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  visibility: hidden;
}

.results-ready .results-container {
  visibility: visible;
}

.results-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  text-align: center;
}

.axis-result {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1rem;
}

.axis-label {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
  text-align: center;
}

.bar-track {
  display: flex;
  height: 75px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}

.bar-left {
  background: var(--blue);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.5s ease;
  border-right: 4px solid #fff;
}

.bar-right {
  background: var(--red);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.5s ease;
}

.bar-inner-text {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.retake-row {
  text-align: center;
  margin-top: 2rem;
}

/* ── Content pages (home extras + info) ──────────────── */

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.content-intro {
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section > h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.term-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.75rem;
}

.term-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.term-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.term-poles {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.term-poles li {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 1rem;
  position: relative;
}

.term-poles li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--blue);
}

.content-cta {
  text-align: center;
  margin-top: 1rem;
}

.scale-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.scale-row .term-card {
  flex: 1;
  margin-bottom: 0;
}

.scale-side-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .scale-side-icon {
    width: 64px;
    height: 64px;
  }

  .scale-row .term-card {
    min-width: 0;
  }

  .scale-row .term-card h3,
  .scale-row .term-poles li {
    overflow-wrap: break-word;
  }
}

.card-note {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-note a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.card-note a:hover {
  text-decoration: underline;
}

/* sticky bar with side buttons (info page, results) */

.bar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bar-btn {
  position: absolute;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.bar-btn:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.bar-btn.left {
  left: 1.5rem;
}

.bar-btn.left {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.bar-btn.right {
  right: 1.5rem;
}

.results-sticky-bar {
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-copy {
  position: absolute;
  left: 1.25rem;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}
.btn-copy:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-copy.copied {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.planes-section {
  margin-bottom: 2rem;
}
.planes-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.plane-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.plane-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.plane-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.plane-middle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.plane-dir {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}
.plane-dir.left,
.plane-dir.right {
  width: 2.2rem;
  text-align: center;
}
.plane-svg {
  width: 180px;
  height: 180px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  overflow: visible;
}
.bar-with-icons {
  display: flex;
  align-items: center;
  gap: 0;
}
.bar-with-icons .bar-track {
  flex: 1;
  border-radius: 0;
  position: relative;
  overflow: visible;
}
.scale-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  flex-shrink: 0;
}
.bar-with-icons .scale-icon:first-child {
  object-position: right center;
}
.bar-with-icons .scale-icon:last-child {
  object-position: left center;
}
.bar-pct {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.bar-pct.pct-left {
  left: 0.5rem;
}
.bar-pct.pct-right {
  right: 0.5rem;
}

@media (max-width: 600px) {
  .planes-row {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .scale-icon {
    width: 64px;
    height: 64px;
  }
  .bar-track {
    height: 56px;
  }
  .bar-pct {
    font-size: 1rem;
  }
  .axis-label {
    font-size: 1.25rem;
  }
}
