* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: Inter, sans-serif;
  color: #101828;
  background: #f8fafc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --blue: #2448d8;
  --dark-blue: #00517f;
  --muted: #667085;
  --border: #e4e7ec;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #f8fafc;
  color: #1a202c;
  line-height: 1.5;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(36, 72, 216, 0.18);
}

.page {
  min-height: 100vh;
  background: #f6f8fc;
  color: #101828;
}

.page.is-plan {
  background: #f7f7f7;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #eaecf0;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.is-plan .site-header {
  border-bottom: 0;
}

.header-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 12px;
}

.header-row {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
}

.logo {
  display: block;
  width: auto;
  height: 39px;
  max-width: 190px;
  object-fit: contain;
}

.is-plan .logo {
  height: 34px;
}

.back-button {
  position: absolute;
  left: 0;
  display: inline-flex;
  width: 40px;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #4a4a4a;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.back-button:hover {
  background: #f2f4f7;
}

.progress-track,
.plan-rule {
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
}

.progress-track {
  height: 6px;
  background: #eaecf0;
}

.progress-value {
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.plan-rule {
  height: 2px;
  background: #666;
}

.content-container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px;
}

.quiz-main {
  min-height: 620px;
  padding: 28px 32px 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

.quiz-main.plan-main {
  min-height: auto;
  padding: 8px 0;
  background: #f7f7f7;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.screen-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
}

.center-stack {
  align-items: center;
  text-align: center;
}

.intro-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  color: var(--blue);
  background: #eef2ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

h1,
p {
  margin: 0;
}

.question-title {
  max-width: 720px;
  color: #101828;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.14;
  text-align: center;
}

.question-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.option-grid {
  display: grid;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 12px;
}

.picture-option {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: #101828;
  text-align: center;
  background: #fff;
  border: 2px solid #e1e5ec;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.picture-option:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.picture-option.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(36, 72, 216, 0.14);
}

.choice-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d0d5dd;
  border-radius: 50%;
}

.is-selected .choice-indicator {
  background: var(--blue);
  border-color: var(--blue);
}

.picture-image-box {
  display: flex;
  width: 100%;
  height: 180px;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  background: #f2f4f7;
}

.picture-image-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.picture-label {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.legal-copy {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.legal-copy a {
  color: inherit;
  text-decoration: underline;
}

.option-list {
  display: flex;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex-direction: column;
  gap: 12px;
}

.option-list .cta-wrap {
  padding-top: 8px;
}

.choice-button {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #101828;
  text-align: left;
  white-space: normal;
  background: #fff;
  border: 1.5px solid #d8dce6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: all 0.18s ease;
}

.choice-button.has-image {
  min-height: 82px;
}

.choice-button:hover {
  background: #f8faff;
  border-color: var(--blue);
  transform: translateY(-1px);
}

.choice-button.is-selected {
  background: #eef2ff;
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.choice-button .choice-indicator {
  position: static;
  flex: 0 0 auto;
}

.choice-button .choice-indicator.checkbox {
  border-radius: 5px;
}

.choice-emoji {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #fff;
  border-radius: 10px;
}

.choice-thumb {
  display: inline-flex;
  width: 66px;
  height: 58px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f4f6fa;
  border-radius: 9px;
}

.choice-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.choice-copy {
  display: block;
  min-width: 0;
  flex: 1;
}

.choice-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.choice-description {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.cta-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  background: var(--blue);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(36, 72, 216, 0.18);
  transition: all 0.18s ease;
}

.primary-button:hover:not(:disabled) {
  background: #1d3bbc;
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
  background: #18329f;
  transform: translateY(0);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.why-ask {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px;
  text-align: left;
  background: #f7f8fc;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
}

.why-ask-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
}

.why-ask-copy {
  color: #475467;
  font-size: 15px;
  line-height: 1.7;
}

.info-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 40px;
  text-align: center;
}

.info-copy {
  display: flex;
  max-width: 650px;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.info-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.12;
}

.info-description {
  color: #344054;
  font-size: 15px;
  line-height: 1.75;
}

.info-image {
  display: block;
  width: 100%;
  max-width: 470px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.info-cta {
  width: 100%;
  max-width: 500px;
}

.loading-screen,
.analyzing-screen {
  display: flex;
  min-height: 58vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  text-align: center;
}

.loading-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.12;
}

.spinner {
  width: 72px;
  height: 72px;
  border: 7px solid #e4e7ec;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding-bottom: 40px;
}

.profile-title {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-align: center;
}

.profile-block,
.profile-cta {
  width: 100%;
  max-width: 720px;
}

.profile-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-heading-label {
  color: #101828;
  font-size: 16px;
  font-weight: 900;
}

.profile-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.gauge-wrap {
  position: relative;
  padding: 49px 8px 0;
}

.gauge-marker-label {
  position: absolute;
  top: 0;
  z-index: 3;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  background: #344054;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.16);
  transform: translateX(-50%);
}

.gauge-marker-label::after {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border-top: 7px solid #344054;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
  transform: translateX(-50%);
}

.gauge-bar {
  position: relative;
  height: 10px;
  background: linear-gradient(
    90deg,
    #7dd3fc 0%,
    #a7f3d0 30%,
    #d9f99d 48%,
    #fde68a 65%,
    #fda4af 82%,
    #ea5b50 100%
  );
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}

.gauge-dot {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.2);
  transform: translate(-50%, -50%);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #667085;
  font-size: 10px;
  line-height: 1.2;
}

.profile-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid;
  border-radius: 12px;
}

.profile-alert-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
}

.profile-alert-title {
  margin-bottom: 4px;
  color: #101828;
  font-size: 15px;
  font-weight: 900;
}

.profile-alert-copy {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.profile-cards {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-card {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.profile-card-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #344054;
  background: #f2f4f7;
  border-radius: 10px;
}

.profile-card-copy {
  min-width: 0;
}

.profile-card-label {
  margin-bottom: 4px;
  color: #475467;
  font-size: 12px;
  line-height: 1.25;
}

.profile-card-value {
  display: block;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.plan-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
  text-align: center;
}

.plan-title {
  max-width: 354px;
  color: #090909;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.16;
  white-space: pre-line;
}

.plan-forecast {
  max-width: 350px;
  margin-top: 4px;
  color: #3f3f46;
  font-size: 15px;
  line-height: 1.25;
}

.plan-chart-wrap {
  width: 100%;
  max-width: 344px;
  margin-top: 28px;
}

.plan-chart {
  display: flex;
  height: 166px;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}

.plan-bar {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-end;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
}

.plan-bar-fill {
  width: 100%;
  border-radius: 10px 10px 0 0;
}

.plan-goal-label {
  position: absolute;
  bottom: 89px;
  left: 50%;
  z-index: 2;
  padding: 2px 8px;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  background: #4ebd69;
  border-radius: 5px;
  transform: translateX(-50%);
}

.plan-goal-dot {
  position: absolute;
  bottom: 71px;
  left: 50%;
  z-index: 2;
  display: flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #32b55c;
  border-radius: 50%;
  transform: translateX(-50%);
}

.plan-goal-dot::after {
  width: 6px;
  height: 6px;
  content: "";
  background: #32b55c;
  border-radius: 50%;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: #545454;
  font-size: 9px;
  line-height: 1.2;
}

.plan-cta {
  max-width: 560px;
  margin-top: 28px;
}

.plan-cta .primary-button {
  min-height: 42px;
  color: #fff;
  font-size: 15px;
  background: var(--dark-blue);
  border-radius: 6px;
  box-shadow: none;
}

.plan-cta .primary-button:hover:not(:disabled) {
  background: #00456c;
}

.analyzing-screen {
  min-height: 62vh;
  align-items: stretch;
  gap: 32px;
}

.analyzing-title {
  font-size: 31px;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
}

.analyzing-items {
  display: flex;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  flex-direction: column;
  gap: 16px;
}

.analyzing-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  opacity: 0.55;
  transition: all 0.25s ease;
}

.analyzing-item.is-done {
  background: #ecfdf3;
  border-color: #a7f3d0;
  opacity: 1;
}

.analyzing-check {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  background: #d0d5dd;
  border-radius: 50%;
}

.is-done .analyzing-check {
  background: #12b76a;
}

.analyzing-copy {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.final-screen {
  display: flex;
  min-height: calc(100vh - 210px);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0 40px;
  text-align: center;
}

.final-stack {
  display: flex;
  width: 100%;
  max-width: 620px;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}

.final-copy {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.final-title {
  max-width: 350px;
  color: #101010;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.final-visual {
  font-size: 49px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.final-cta {
  width: 100%;
  max-width: 500px;
  padding-top: 4px;
}

.final-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  background: var(--dark-blue);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 81, 127, 0.22);
  transition: all 0.18s ease;
}

.final-button:hover {
  background: #00456c;
  transform: translateY(-1px);
}

.final-button:active {
  background: #003b5d;
  transform: translateY(0);
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}

@media (min-width: 480px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .picture-image-box {
    height: 140px;
  }

  .final-title {
    max-width: 610px;
    font-size: 32px;
  }

  .final-visual {
    font-size: 56px;
  }
}

@media (min-width: 768px) {
  .header-container {
    padding-right: 24px;
    padding-left: 24px;
  }

  .logo {
    height: 46px;
  }

  .is-plan .logo {
    height: 38px;
  }

  .content-container {
    padding-right: 24px;
    padding-left: 24px;
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .question-title {
    font-size: 38px;
  }

  .question-subtitle {
    font-size: 16px;
  }

  .picture-image-box {
    height: 175px;
    padding: 8px;
  }

  .picture-label {
    font-size: 16px;
  }

  .why-ask {
    padding: 20px;
  }

  .info-title {
    font-size: 40px;
  }

  .info-description {
    font-size: 17px;
  }

  .loading-title {
    font-size: 48px;
  }

  .profile-title {
    font-size: 40px;
  }

  .profile-screen {
    gap: 28px;
  }

  .profile-heading-label {
    font-size: 18px;
  }

  .profile-alert {
    padding: 20px;
  }

  .profile-alert-title {
    font-size: 17px;
  }

  .profile-alert-copy {
    font-size: 15px;
  }

  .profile-card {
    min-height: 110px;
    padding: 16px;
  }

  .profile-card-icon {
    width: 38px;
    height: 38px;
  }

  .profile-card-label {
    font-size: 13px;
  }

  .profile-card-value {
    font-size: 17px;
  }

  .plan-title {
    max-width: 720px;
    font-size: 39px;
    line-height: 1.1;
  }

  .plan-forecast {
    max-width: 650px;
    margin-top: 12px;
    font-size: 19px;
    line-height: 1.4;
  }

  .plan-chart-wrap {
    max-width: 560px;
    margin-top: 36px;
  }

  .plan-chart {
    height: 220px;
    gap: 16px;
  }

  .plan-goal-label {
    bottom: 119px;
    font-size: 10px;
  }

  .plan-goal-dot {
    bottom: 95px;
    width: 18px;
    height: 18px;
  }

  .plan-goal-dot::after {
    width: 8px;
    height: 8px;
  }

  .chart-labels {
    font-size: 11px;
  }

  .plan-cta {
    margin-top: 36px;
  }

  .plan-cta .primary-button {
    min-height: 52px;
    font-size: 17px;
  }

  .analyzing-title {
    font-size: 44px;
  }

  .analyzing-copy {
    font-size: 16px;
  }

  .final-screen {
    min-height: 62vh;
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .final-stack {
    gap: 32px;
  }

  .final-title {
    font-size: 42px;
  }

  .final-visual {
    font-size: 68px;
    letter-spacing: 0.02em;
  }

  .final-cta {
    padding-top: 8px;
  }

  .final-button {
    min-height: 64px;
    padding-right: 24px;
    padding-left: 24px;
    font-size: 18px;
  }
}

@media (max-width: 479px) {
  .quiz-main {
    min-height: auto;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .quiz-main.plan-main {
    padding-top: 8px;
  }

  .content-container {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .profile-heading-row {
    gap: 10px;
  }

  .profile-heading-label {
    font-size: 16px;
  }
}
