:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-soft: #f1f3f0;
  --surface-muted: #e8ece8;
  --ink: #20211f;
  --muted: #6f746e;
  --quiet: #8c918b;
  --line: #deded8;
  --line-strong: #c8ccc6;
  --accent: #0b6f5f;
  --accent-soft: #e7f2ee;
  --focus: #10a37f;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --radius: 8px;
  --shadow: 0 18px 56px rgba(32, 33, 31, 0.07);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(16, 163, 127, 0.25);
  outline-offset: 2px;
}

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  align-content: space-between;
  background: rgba(255, 255, 255, 0.74);
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: 34px;
  min-height: 100vh;
  padding: 28px 24px;
  position: sticky;
  top: 0;
}

@supports (backdrop-filter: blur(14px)) {
  .sidebar,
  .actions {
    backdrop-filter: blur(14px);
  }
}

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

.brand-mark {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(32, 33, 31, 0.04);
  color: var(--ink);
  display: grid;
  font-size: 15px;
  font-weight: 780;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.brand span,
.privacy-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.progress-list {
  display: grid;
  gap: 13px;
}

.progress-item {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 13px;
  min-height: 34px;
}

.progress-item span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--quiet);
  display: grid;
  font-size: 12px;
  font-weight: 650;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.progress-item p {
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
}

.progress-item.is-active {
  color: var(--ink);
}

.progress-item.is-active span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 760;
}

.progress-item.is-done {
  color: var(--ink);
}

.progress-item.is-done span {
  color: var(--accent);
}

.privacy-note {
  border-top: 1px solid var(--line);
  margin: 0;
  padding-top: 18px;
}

.main {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  margin: 0 auto;
  max-width: 1180px;
  min-width: 0;
  min-height: 100vh;
  padding: 32px 48px 26px;
  width: 100%;
}

.topbar {
  align-items: start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.section-label,
.card-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.13;
  margin: 0;
  max-width: 840px;
}

.progress-chip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(32, 33, 31, 0.04);
  color: var(--accent);
  display: grid;
  font-size: 15px;
  font-weight: 760;
  min-width: 58px;
  padding: 10px 14px;
  text-align: center;
}

.mobile-progress {
  background: var(--surface-muted);
  border-radius: 999px;
  display: none;
  height: 6px;
  margin-top: 18px;
  overflow: hidden;
}

.mobile-progress span {
  background: var(--accent);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.question-panel {
  align-self: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 28px 0;
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  width: 100%;
}

.helper,
.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
  margin: 0 0 16px;
}

.intro-grid {
  align-items: stretch;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(260px, 0.76fr) minmax(420px, 1.24fr);
  min-width: 0;
}

.intro-copy {
  align-content: center;
  display: grid;
  max-width: 420px;
  min-width: 0;
}

.intro-copy .lead {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.42;
  margin-bottom: 18px;
}

.quiet-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  margin: 0;
}

.trust-copy {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 18px 0 0;
  padding-left: 12px;
}

.intro-points {
  display: grid;
  gap: 15px;
  margin-top: 34px;
}

.intro-point {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.intro-point span {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  display: grid;
  font-size: 14px;
  font-weight: 760;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.intro-point strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.intro-point p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 3px 0 0;
}

.concept-layout {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  min-width: 0;
}

.concept-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  padding: 24px;
}

.concept-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.concept-card p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.68;
  margin: 0;
}

.prototype-shell {
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  justify-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.prototype-shell .card-label {
  justify-self: start;
}

.prototype-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    #050909;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 36px;
  box-shadow: 0 24px 48px rgba(7, 13, 13, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-height: min(60vh, 640px);
  max-width: 360px;
  overflow: hidden;
  padding: 8px;
  width: min(100%, 360px);
}

.prototype-frame {
  background: #071010;
  border: 0;
  border-radius: 28px;
  display: block;
  height: min(56vh, 620px);
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.prototype-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  max-width: 390px;
  width: min(100%, 390px);
}

.prototype-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.prototype-link:hover {
  text-decoration: underline;
}

.prototype-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: -2px 0 0;
}

.review-check {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 111, 95, 0.22);
  border-radius: var(--radius);
  color: var(--ink);
  display: flex;
  gap: 10px;
  font-weight: 680;
  margin-top: 18px;
  padding: 14px 16px;
}

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

.story-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.story-strip div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 108px;
  padding: 16px;
}

.story-strip span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 760;
  margin-bottom: 16px;
}

.story-strip strong,
.story-strip p {
  display: block;
  margin: 0;
}

.story-strip strong {
  font-size: 15px;
}

.story-strip p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  margin-top: 6px;
}

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

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

.field span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
}

.text-input,
.text-area {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 52px;
  outline: none;
  padding: 14px 15px;
  width: 100%;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.12);
}

.text-area {
  line-height: 1.5;
  margin-top: 16px;
  min-height: 112px;
  resize: vertical;
}

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

.option-stack,
.split-actions {
  display: grid;
  gap: 12px;
}

.split-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 54px;
  padding: 14px 16px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.option:hover,
.choice-button:hover,
.scale-dot:hover {
  border-color: var(--accent);
}

.option:active,
.choice-button:active,
.scale-dot:active,
.primary:active,
.secondary:active {
  transform: translateY(1px);
}

.option.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: #063f36;
  font-weight: 680;
}

.option.row {
  text-align: center;
}

.microcopy {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

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

.matrix-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 360px);
  padding: 16px;
}

.matrix-row p {
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.scale-wrap {
  display: grid;
  gap: 8px;
}

.scale-end-labels {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  line-height: 1.22;
}

.scale-end-labels span:first-child {
  grid-column: 1;
  text-align: center;
}

.scale-end-labels span:last-child {
  grid-column: 5;
  text-align: center;
}

.scale {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
}

.scale-dot {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  display: grid;
  font-weight: 650;
  height: 42px;
  justify-content: center;
  width: 100%;
}

.scale-dot.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.maxdiff {
  display: grid;
  gap: 12px;
}

.maxdiff-head,
.name-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 112px minmax(110px, 1fr) 112px;
}

.maxdiff-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  text-align: center;
}

.maxdiff-head span:first-child {
  grid-column: 1;
}

.maxdiff-head span:last-child {
  grid-column: 3;
}

.name-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.name-row strong {
  font-size: 24px;
  font-weight: 760;
  text-align: center;
}

.choice-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  min-height: 44px;
}

.choice-button.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.name-focus {
  align-items: center;
  background: var(--ink);
  border-radius: var(--radius);
  color: #ffffff;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 16px 18px;
}

.name-focus span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 680;
}

.name-focus strong {
  font-size: 28px;
  font-weight: 760;
}

.price-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.price-card p {
  font-size: 21px;
  line-height: 1.35;
  margin: 0 0 24px;
}

.done-card {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 260px;
  text-align: center;
}

.done-icon {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #ffffff;
  display: grid;
  font-size: 24px;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.done-card p {
  font-size: 24px;
  font-weight: 760;
  margin: 0;
}

.done-card span {
  color: var(--muted);
}

.error {
  background: var(--danger-bg);
  border: 1px solid #ffccc7;
  border-radius: var(--radius);
  color: var(--danger);
  font-weight: 680;
  margin: 18px 0 0;
  padding: 12px 14px;
}

.actions {
  align-items: center;
  background: rgba(247, 247, 244, 0.88);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 10px 0 0;
  position: sticky;
  bottom: 0;
}

.primary,
.secondary {
  border-radius: var(--radius);
  min-height: 52px;
  min-width: 140px;
  padding: 0 22px;
  white-space: nowrap;
}

.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 20px rgba(11, 111, 95, 0.16);
  color: #ffffff;
  font-weight: 760;
}

.primary:hover {
  background: #075f51;
  border-color: #075f51;
}

.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 650;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main {
    padding-left: 32px;
    padding-right: 32px;
  }

  .intro-grid,
  .concept-layout {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    max-width: 680px;
  }
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 22px 16px 18px;
    width: 100vw;
  }

  .topbar {
    align-items: start;
  }

  h1 {
    font-size: clamp(20px, 7vw, 28px);
  }

  .progress-chip {
    font-size: 13px;
    min-width: 50px;
    padding: 8px 10px;
  }

  .mobile-progress {
    display: block;
  }

  .question-panel {
    max-width: calc(100vw - 32px);
    margin: 22px 0;
    overflow: hidden;
  }

  .intro-grid,
  .concept-layout,
  .intro-copy,
  .concept-card,
  .prototype-shell,
  .helper,
  .lead,
  .quiet-copy {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    width: 100%;
  }

  .field-grid,
  .option-grid,
  .story-strip,
  .split-actions {
    grid-template-columns: 1fr;
  }

  .intro-points {
    margin-top: 24px;
  }

  .story-strip div {
    min-height: 92px;
  }

  .story-strip span {
    margin-bottom: 8px;
  }

  .matrix-row {
    grid-template-columns: 1fr;
  }

  .prototype-frame {
    height: min(58vh, 540px);
    min-height: 430px;
  }

  .prototype-stage {
    max-height: min(60vh, 560px);
    max-width: 330px;
    padding: 7px;
  }

  .scale {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .scale-dot {
    height: 38px;
  }

  .maxdiff-head,
  .name-row {
    grid-template-columns: 86px minmax(80px, 1fr) 86px;
  }

  .name-row strong {
    font-size: 20px;
  }

  .actions {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: env(safe-area-inset-bottom);
    width: 100vw;
  }

  .primary,
  .secondary {
    flex: 1;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 520px) {
  .question-panel {
    padding: 18px;
  }

  .intro-copy .lead,
  .quiet-copy,
  .trust-copy,
  .intro-points,
  .prototype-shell,
  .prototype-stage,
  .prototype-actions,
  .concept-card,
  .review-check,
  .option-grid,
  .option-stack,
  .matrix,
  .maxdiff,
  .price-card,
  .done-card {
    max-width: calc(100vw - 68px);
    width: calc(100vw - 68px);
  }

  .intro-point {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .intro-point span {
    height: 40px;
    width: 40px;
  }

  .matrix-row {
    padding: 14px;
  }

  .scale,
  .scale-end-labels {
    gap: 6px;
    grid-template-columns: repeat(5, minmax(34px, 1fr));
  }

  .scale-dot {
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
