:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(12, 27, 45, 0.9);
  --panel-2: #10243a;
  --text: #f4f8fb;
  --muted: #93a7b9;
  --line: rgba(155, 190, 215, 0.16);
  --accent: #3de6c5;
  --accent-2: #45a7ff;
  --danger: #ff8796;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(61, 230, 197, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 230, 197, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #123350 0, #07111f 44%, #050b14 100%);
  background-size: 44px 44px, 44px 44px, auto;
  overflow: hidden;
}

button, input { font: inherit; }

.ambient {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .13;
  pointer-events: none;
}

.ambient-one { top: -140px; left: -160px; background: var(--accent); }
.ambient-two { right: -190px; bottom: -130px; background: var(--accent-2); }

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 9px max(8px, env(safe-area-inset-bottom));
  background: rgba(4, 12, 22, .3);
  box-shadow: 0 0 80px rgba(0, 0, 0, .34);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(61, 230, 197, .5);
  border-radius: 11px;
  color: var(--accent);
  background: rgba(61, 230, 197, .08);
}

.brand-mark svg { width: 22px; height: 22px; fill: var(--accent); }
.brand-mark .logo-bite { fill: #0c2134; }

.research-tag, .eyebrow {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.research-tag { display: none; }

.survey-card {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 62px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: 0;
  padding: 15px 14px 11px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(15, 34, 55, .96), rgba(7, 18, 31, .96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.progress-track span {
  display: block;
  width: 6.67%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(61, 230, 197, .55);
  transition: width .35s ease;
}

.question-stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: 15px 0 10px;
  overflow: hidden;
}

.question-stage.animate-in { animation: question-in .34s ease both; }

@keyframes question-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-kicker { margin: 0 0 6px; color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }

.question-stage h1 {
  max-width: 590px;
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 5.7vw, 1.5rem);
  line-height: 1.14;
  letter-spacing: -.035em;
}

.question-help { margin: -5px 0 9px; color: var(--muted); font-size: .72rem; }
.option-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 8px 39px 8px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #dbe7ef;
  background: rgba(255, 255, 255, .035);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  font-size: .86rem;
  line-height: 1.22;
}

.option::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 17px;
  height: 17px;
  border: 1px solid #567086;
  border-radius: 50%;
}

.option:hover { transform: translateY(-1px); border-color: rgba(61, 230, 197, .45); }
.option.selected { border-color: var(--accent); color: #fff; background: rgba(61, 230, 197, .11); }
.option.selected::after { border: 5px solid var(--accent); background: #07111f; }
.multi .option::after { border-radius: 5px; }
.option-grid.dense { gap: 4px; }
.option-grid.dense .option { min-height: 34px; padding-block: 5px; font-size: .75rem; }
.option-grid.dense .option::after { width: 15px; height: 15px; }

.survey-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  background: linear-gradient(transparent, #091725 30%);
}

.button {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button:focus-visible, .option:focus-visible, input:focus-visible { outline: 3px solid rgba(69, 167, 255, .36); outline-offset: 2px; }
.button-primary { color: #031a18; background: linear-gradient(120deg, var(--accent), #63efad); box-shadow: 0 10px 30px rgba(61, 230, 197, .18); }
.button-secondary { color: #b9c8d4; border-color: var(--line); background: rgba(255, 255, 255, .04); }
.button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.validation-message, .field-error { min-height: 15px; margin: 5px 2px 0; color: var(--danger); font-size: .7rem; }
.survey-thanks {
  flex: 0 0 auto;
  margin: 2px 2px 0;
  padding-top: 7px;
  border-top: 1px solid rgba(155, 190, 215, .12);
  color: #71879a;
  font-size: .62rem;
  line-height: 1.35;
  text-align: center;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 9, 16, .7);
  backdrop-filter: blur(15px);
}

.modal-layer[hidden] { display: none; }

.modal-card {
  width: min(100%, 390px);
  padding: 28px 20px 23px;
  border: 1px solid rgba(129, 190, 220, .2);
  border-radius: 22px;
  background: linear-gradient(145deg, #102943, #081522 72%);
  box-shadow: 0 32px 110px rgba(0, 0, 0, .58);
  text-align: center;
  animation: modal-in .42s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card h1, .modal-card h2 { margin: 10px 0 14px; font-size: clamp(1.85rem, 7vw, 2.55rem); line-height: 1.08; letter-spacing: -.04em; }
.modal-card > p:not(.eyebrow) { margin: 0 auto 24px; color: #a9bac8; font-size: 1rem; line-height: 1.65; }
.modal-button { width: 100%; margin-top: 4px; }
.modal-card small { display: block; margin-top: 14px; color: #71879a; }

.product-logo {
  display: grid;
  justify-items: center;
  gap: 13px;
  margin: 0 auto 30px;
}

.product-logo strong {
  color: #e9fffa;
  font-size: .78rem;
  letter-spacing: .28em;
  padding-left: .28em;
}

.logo-tile {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(61, 230, 197, .48);
  border-radius: 23px;
  color: var(--accent);
  background: rgba(61, 230, 197, .08);
}

.logo-tile svg { width: 49px; height: 49px; fill: var(--accent); filter: drop-shadow(0 0 10px rgba(61,230,197,.25)); }
.logo-tile .logo-bite { fill: #0d2940; }
.logo-tile::before { content: ""; position: absolute; inset: -8px; border: 1px solid rgba(61, 230, 197, .16); border-radius: 28px; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.92); opacity: .3; } 50% { transform: scale(1.08); opacity: .85; } }

.success-mark { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border-radius: 50%; color: #052018; background: var(--accent); font-size: 1.6rem; font-weight: 900; }
.welcome-card {
  padding: 34px 24px 27px;
}

.welcome-card h1 {
  margin: 0 0 32px;
  font-size: clamp(1.42rem, 6.4vw, 1.8rem);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: .035em;
  text-wrap: balance;
}

.welcome-card h1 span {
  display: block;
  white-space: nowrap;
}

.welcome-card h1 span + span {
  margin-top: 5px;
  color: #e8fff9;
}

.welcome-card .modal-button {
  min-height: 54px;
  border-radius: 14px;
  font-size: .82rem;
  letter-spacing: .12em;
}

.welcome-card .modal-button span {
  display: inline-block;
  margin-left: 6px;
  font-size: 1rem;
  transition: transform .18s ease;
}

.welcome-card .modal-button:hover span { transform: translateX(3px); }

.loading-card { padding-block: 38px 34px; }
.loading-card h2 { margin-bottom: 30px; font-size: 1.45rem; letter-spacing: .055em; }
.loader-orbit {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border: 1px solid rgba(61, 230, 197, .18);
  border-radius: 50%;
}
.loader-orbit::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(61, 230, 197, .14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loader-orbit span { position: absolute; inset: 24px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(61,230,197,.7); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: #91a8b9; font-size: .82rem; }
.loading-row strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.loading-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.loading-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 18px rgba(61,230,197,.45); }
.loading-message {
  margin: 22px 0 0;
  padding: 15px 14px;
  border: 1px solid rgba(61, 230, 197, .58);
  border-radius: 14px;
  color: #effffc;
  background: linear-gradient(135deg, rgba(61, 230, 197, .16), rgba(69, 167, 255, .1));
  box-shadow: 0 10px 30px rgba(61, 230, 197, .09), inset 0 0 28px rgba(61, 230, 197, .045);
  text-align: left;
}
.loading-message strong {
  display: block;
  margin-bottom: 7px;
  color: #63f4d7;
  font-size: .8rem;
  letter-spacing: .12em;
}
.loading-message span {
  display: block;
  color: #e5f3f5;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.55;
}
.wallet-card h2 { letter-spacing: .055em; }
.wallet-card form { text-align: left; }
.wallet-card label { display: block; margin-bottom: 8px; color: #d8e5ed; font-size: .86rem; font-weight: 800; }
.wallet-card input { width: 100%; min-height: 54px; padding: 0 15px; border: 1px solid #38546a; border-radius: 13px; color: #fff; background: #07131f; }
.wallet-card input::placeholder { color: #597286; }
.field-hint { margin: 9px 2px 0; color: #7890a2; font-size: .75rem; line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Compact iPhones, including iPhone SE in portrait */
@media (max-height: 700px) {
  .shell { padding-top: max(5px, env(safe-area-inset-top)); padding-bottom: max(5px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 32px; margin-bottom: 5px; }
  .brand { font-size: .82rem; }
  .brand-mark { width: 27px; height: 27px; }
  .survey-card { height: calc(100dvh - 47px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 10px 12px 8px; }
  .progress-meta { margin-bottom: 4px; font-size: .68rem; }
  .progress-track { height: 4px; }
  .question-stage { padding: 8px 0 5px; }
  .question-kicker { margin-bottom: 3px; font-size: .58rem; }
  .question-stage h1 { margin-bottom: 7px; font-size: 1.08rem; line-height: 1.1; }
  .question-help { margin: -2px 0 5px; font-size: .62rem; }
  .option-grid { gap: 4px; }
  .option { min-height: 34px; padding-block: 4px; font-size: .72rem; }
  .option-grid.dense { gap: 2px; }
  .option-grid.dense .option { min-height: 27px; padding-block: 2px; font-size: .64rem; }
  .survey-actions { padding-top: 4px; }
  .button { min-height: 36px; padding-inline: 14px; font-size: .76rem; }
  .validation-message { min-height: 11px; margin-top: 2px; font-size: .6rem; }
  .survey-thanks { padding-top: 4px; font-size: .54rem; line-height: 1.25; }
  .modal-card { max-height: calc(100dvh - 20px); padding: 20px 17px 18px; overflow: hidden; }
  .product-logo { gap: 8px; margin-bottom: 20px; }
  .logo-tile { width: 64px; height: 64px; }
  .logo-tile svg { width: 42px; height: 42px; }
  .welcome-card h1 { margin-bottom: 23px; }
  .loading-card { padding-block: 24px 20px; }
  .loading-card h2 { margin-bottom: 20px; }
  .loader-orbit { margin-bottom: 15px; }
  .loading-message { margin-top: 14px; padding: 10px 11px; }
  .loading-message strong { margin-bottom: 5px; font-size: .68rem; }
  .loading-message span { font-size: .75rem; line-height: 1.42; }
}

/* Narrow iPhones and display zoom modes */
@media (max-width: 340px) {
  .shell { padding-inline: 6px; }
  .survey-card { padding-inline: 11px; border-radius: 18px; }
  .question-stage h1 { font-size: 1.05rem; }
  .modal-layer { padding: 10px; }
  .welcome-card h1 { font-size: 1.3rem; letter-spacing: .02em; }
}
