:root {
  --bg: #f6f7ef;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #14213d;
  --muted: #607089;
  --line: rgba(20, 33, 61, 0.12);
  --line-strong: rgba(20, 33, 61, 0.2);
  --sea: #0f6fff;
  --sea-deep: #0047b7;
  --foam: #e8f3ff;
  --lime: #ccff5d;
  --peach: #ffb86a;
  --rose: #ff7f7f;
  --shadow: 0 30px 80px rgba(20, 33, 61, 0.14);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(204, 255, 93, 0.58), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 111, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #fbfbf6 0%, #eef6ff 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

.page-noise,
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-noise {
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(20, 33, 61, 0.38) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(20, 33, 61, 0.25) 0 1px, transparent 1px);
  background-size: 18px 18px, 24px 24px;
}

.page-glow-a {
  background: radial-gradient(circle at 12% 14%, rgba(15, 111, 255, 0.18), transparent 30%);
}

.page-glow-b {
  background: radial-gradient(circle at 92% 82%, rgba(255, 184, 106, 0.22), transparent 26%);
}

.shell {
  width: min(1480px, calc(100% - 40px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.hero-panel,
.survey-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
  border-radius: 34px;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: auto -32px -34px auto;
  width: 220px;
  height: 220px;
  border-radius: 46% 54% 60% 40%;
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.18), rgba(204, 255, 93, 0.26));
  filter: blur(4px);
}

.survey-panel {
  padding: 24px;
  border-radius: 36px;
  overflow: hidden;
}

.eyebrow,
.topbar-label,
.fact-kicker,
.step-label {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--sea-deep);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 0.95;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2.9rem, 5vw, 4.7rem);
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}

.meter-card {
  margin-top: 28px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(15, 111, 255, 0.08), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(15, 111, 255, 0.14);
}

.meter-head,
.meter-legend,
.topbar,
.nav-row,
.choice-meta,
.inline-list,
.rank-toolbar,
.price-grid,
.channel-legend,
.success-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meter-head,
.meter-legend {
  font-size: 0.88rem;
  color: var(--muted);
}

.meter-track,
.inline-progress {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.meter-track {
  height: 18px;
  margin: 14px 0 10px;
  background: rgba(20, 33, 61, 0.08);
}

.meter-fill,
.inline-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  transition: width 320ms ease;
  background:
    linear-gradient(90deg, rgba(15, 111, 255, 0.94), rgba(57, 162, 255, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
}

.meter-fill::after,
.inline-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.24) 48%, transparent 72%);
  animation: shimmer 2.4s linear infinite;
}

.hero-facts {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.hero-facts article {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.hero-facts strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}

.hero-facts p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.topbar {
  gap: 24px;
}

.topbar h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.topbar-pill {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.inline-progress {
  height: 10px;
  margin-top: 18px;
  background: rgba(20, 33, 61, 0.08);
}

.feedback-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 127, 127, 0.12);
  border: 1px solid rgba(255, 127, 127, 0.3);
  color: #9d3131;
  font-weight: 600;
}

.question-stack {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.question-card,
.matrix-card,
.channel-card,
.success-card {
  position: relative;
  padding: 20px;
  border-radius: 28px;
  background: var(--panel-strong);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.question-card.is-highlighted {
  background:
    linear-gradient(180deg, rgba(232, 243, 255, 0.94), rgba(255, 255, 255, 0.96));
}

.question-stack.is-step-enter {
  animation: stepEnter 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.question-card.error {
  border-color: rgba(220, 65, 65, 0.4);
  box-shadow: inset 0 0 0 1px rgba(220, 65, 65, 0.16);
}

.question-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.question-head h3 {
  font-size: 1.42rem;
  line-height: 1.08;
}

.question-help,
.field-note,
.choice-hint,
.empty-state,
.question-summary,
.scale-legend,
.success-card p,
pre,
label,
input,
textarea {
  color: var(--muted);
}

.question-help,
.choice-hint,
.question-summary,
.empty-state,
.field-note {
  margin: 8px 0 0;
  line-height: 1.55;
  font-size: 0.95rem;
}

.question-summary {
  font-weight: 700;
  color: var(--sea-deep);
}

.required-pill {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 111, 255, 0.08);
  color: var(--sea-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.text-input,
.city-input,
.textarea-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(250, 251, 255, 0.9);
  color: var(--text);
  font: inherit;
}

.textarea-input {
  min-height: 130px;
  resize: vertical;
}

.choice-grid,
.chip-grid,
.likert-grid,
.mini-rank-grid,
.scale-grid {
  display: grid;
  gap: 12px;
}

.choice-grid.cols-2,
.chip-grid.cols-2,
.likert-grid.cols-2,
.scale-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid.cols-3,
.chip-grid.cols-3,
.likert-grid.cols-3,
.scale-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid.cols-4,
.chip-grid.cols-4,
.likert-grid.cols-4,
.scale-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-grid.cols-5,
.chip-grid.cols-5,
.likert-grid.cols-5,
.scale-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-btn,
.chip-btn,
.likert-btn,
.scale-btn,
.rank-btn,
.channel-btn,
.move-btn,
.ghost-btn,
.solid-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.choice-btn,
.chip-btn,
.likert-btn,
.scale-btn,
.rank-btn,
.channel-btn {
  position: relative;
  width: 100%;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: white;
  color: var(--text);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.choice-btn:hover,
.chip-btn:hover,
.likert-btn:hover,
.scale-btn:hover,
.rank-btn:hover,
.channel-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 111, 255, 0.36);
  box-shadow: 0 14px 34px rgba(15, 111, 255, 0.1);
}

.choice-btn[aria-pressed="true"],
.chip-btn[aria-pressed="true"],
.likert-btn[aria-pressed="true"],
.scale-btn[aria-pressed="true"],
.rank-btn[aria-pressed="true"],
.channel-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.1), rgba(204, 255, 93, 0.24));
  border-color: rgba(15, 111, 255, 0.45);
  box-shadow: 0 16px 36px rgba(15, 111, 255, 0.12);
}

.choice-btn {
  padding: 18px;
}

.choice-btn strong,
.channel-btn strong,
.rank-item strong {
  display: block;
  font-size: 1rem;
}

.choice-btn span,
.channel-btn span {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
  color: var(--muted);
  font-size: 0.92rem;
}

.chip-btn,
.likert-btn,
.scale-btn {
  padding: 16px;
  text-align: center;
  font-weight: 700;
}

.chip-btn {
  border-radius: 999px;
  min-height: 54px;
}

.likert-btn small,
.scale-btn small {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.field-error {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #c03636;
}

.matrix-stack {
  display: grid;
  gap: 14px;
}

.matrix-card {
  display: grid;
  gap: 14px;
}

.matrix-card h4,
.rank-item strong {
  margin: 0;
  font-size: 1rem;
}

.matrix-card p,
.rank-item span {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.scale-grid,
.likert-grid {
  align-items: stretch;
}

.scale-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.rank-shell {
  display: grid;
  gap: 14px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item,
.channel-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(20, 33, 61, 0.1);
  background: rgba(250, 251, 255, 0.9);
}

.rank-index,
.channel-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #0f172a;
  color: white;
  font-weight: 800;
}

.rank-handle {
  font-size: 1.2rem;
  color: var(--muted);
  cursor: grab;
}

.rank-toolbar {
  justify-content: flex-end;
}

.move-btn {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.06);
  color: var(--text);
  font-weight: 800;
}

.move-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.price-field {
  display: grid;
  gap: 8px;
}

.price-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(250, 251, 255, 0.9);
}

.price-shell span {
  font-weight: 800;
  color: var(--sea-deep);
}

.price-shell input {
  border: 0;
  padding: 16px 0;
  background: transparent;
  color: var(--text);
}

.page-transition {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(204, 255, 93, 0.9), transparent 18%),
    linear-gradient(90deg, rgba(15, 111, 255, 0), rgba(15, 111, 255, 0.1) 22%, rgba(15, 111, 255, 0.9) 48%, rgba(255, 255, 255, 0.08) 100%);
  transform: translateX(-110%);
}

.page-transition.is-active {
  animation: pageSweep 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.concept-card {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 243, 255, 0.92));
  border: 1px solid rgba(15, 111, 255, 0.1);
}

.concept-visual {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(20, 33, 61, 0.12);
}

.concept-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.concept-copy h4,
.spotlight-card h4,
.range-card h4 {
  margin: 0;
  font-size: 1.14rem;
}

.concept-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 111, 255, 0.08);
  color: var(--sea-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.concept-copy p,
.concept-points li,
.spotlight-card p,
.range-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.concept-points {
  margin: 4px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.spotlight-grid,
.range-stack {
  display: grid;
  gap: 14px;
}

.spotlight-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  align-items: start;
}

.spotlight-card,
.range-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(20, 33, 61, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.bubble-row {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.bubble-row.bubbles-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bubble-row.bubbles-5 {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.bubble-btn {
  display: grid;
  place-items: center;
  min-height: 56px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 18px;
  background: rgba(15, 111, 255, 0.04);
  color: var(--sea-deep);
  font-weight: 800;
  text-align: center;
}

.bubble-btn small {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.bubble-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(15, 111, 255, 0.14), rgba(204, 255, 93, 0.28));
}

.spotlight-meta,
.range-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.range-card {
  display: grid;
  gap: 12px;
}

.range-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.range-output {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 111, 255, 0.08);
  color: var(--sea-deep);
  font-weight: 800;
}

.range-input {
  width: 100%;
  accent-color: var(--sea);
}

.range-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sea-deep);
}

.rank-shell {
  display: grid;
  gap: 14px;
}

.rank-list {
  display: grid;
  gap: 10px;
  touch-action: none;
}

.rank-item {
  touch-action: none;
  transition: box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.rank-item.dragging {
  opacity: 0.92;
  box-shadow: 0 24px 48px rgba(15, 111, 255, 0.18);
  z-index: 5;
}

.rank-placeholder {
  height: 84px;
  border-radius: 18px;
  border: 2px dashed rgba(15, 111, 255, 0.22);
  background: rgba(232, 243, 255, 0.68);
}

.rank-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.channel-stack {
  display: grid;
  gap: 12px;
}

.channel-card {
  grid-template-columns: auto 1fr;
  cursor: pointer;
}

.channel-card small {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.channel-card.active-first {
  border-color: rgba(15, 111, 255, 0.42);
  background: rgba(232, 243, 255, 0.92);
}

.channel-card.active-second {
  border-color: rgba(255, 184, 106, 0.45);
  background: rgba(255, 246, 235, 0.92);
}

.channel-legend {
  justify-content: flex-start;
  gap: 16px;
  font-size: 0.88rem;
  font-weight: 700;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-swatch.first {
  background: var(--sea);
}

.legend-swatch.second {
  background: var(--peach);
}

.ghost-btn,
.solid-btn {
  padding: 14px 20px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.ghost-btn:hover,
.solid-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.solid-btn {
  min-width: 164px;
  border: 1px solid rgba(15, 111, 255, 0.2);
  background: linear-gradient(135deg, var(--sea), #1aa6ff);
  color: white;
  box-shadow: 0 18px 30px rgba(15, 111, 255, 0.22);
}

.ghost-btn:disabled,
.solid-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nav-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 33, 61, 0.08);
}

.nav-meta {
  flex: 1;
  min-width: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.success-card {
  margin-top: 20px;
}

.success-card h2 {
  margin-top: 10px;
  font-size: 2.8rem;
}

.success-card p {
  max-width: 44ch;
  margin: 14px 0 0;
  line-height: 1.6;
}

pre {
  overflow: auto;
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
  color: rgba(255, 255, 255, 0.86);
  font: 0.8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[hidden] {
  display: none !important;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(160%);
  }
}

@keyframes pageSweep {
  0% {
    opacity: 0;
    transform: translateX(-110%);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(110%);
  }
}

@keyframes stepEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .shell {
    width: min(100% - 24px, 100%);
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: 2;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 100%);
    margin: 10px auto 20px;
  }

  .hero-panel,
  .survey-panel {
    border-radius: 28px;
  }

  .hero-panel,
  .survey-panel,
  .question-card,
  .matrix-card {
    padding: 18px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar-pill {
    align-self: flex-start;
  }

  .choice-grid.cols-2,
  .choice-grid.cols-3,
  .choice-grid.cols-4,
  .choice-grid.cols-5,
  .chip-grid.cols-2,
  .chip-grid.cols-3,
  .chip-grid.cols-4,
  .chip-grid.cols-5,
  .likert-grid.cols-2,
  .likert-grid.cols-3,
  .likert-grid.cols-4,
  .likert-grid.cols-5,
  .scale-grid.cols-2,
  .scale-grid.cols-3,
  .scale-grid.cols-4,
  .scale-grid.cols-5,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .concept-card,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .concept-visual {
    min-height: 260px;
  }

  .nav-row {
    align-items: stretch;
    flex-direction: column;
  }

  .solid-btn,
  .ghost-btn {
    width: 100%;
  }

  .nav-meta {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
