:root {
  --bg: #F2F3F5;
  --card: #FFFFFF;
  --ink: #191F27;
  --ink-soft: #5C6470;
  --line: rgba(25, 31, 39, .14);
  --accent: #1E4FD6;
  --accent-deep: #153A9F;
  --accent-tint: rgba(30, 79, 214, .08);
  --danger: #A5301F;
  --danger-tint: rgba(165, 48, 31, .08);
  --success: #177A52;
  --success-tint: rgba(23, 122, 82, .1);
  --warn: #A97208;
  --warn-border: rgba(216, 150, 20, .4);
  --warn-bg: rgba(216, 150, 20, .08);
  --warn-text: #7A5606;
  --radius: 6px;
  --radius-md: 4px;
  --radius-sm: 3px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-deep);
}

input,
select,
button {
  font-family: inherit;
}

input::placeholder {
  color: rgba(25, 31, 39, .32);
}

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

/* Layout */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(24px, 6vw, 48px) clamp(14px, 4vw, 20px) calc(clamp(88px, 22vw, 100px) + env(safe-area-inset-bottom));
}

.brand-block {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: clamp(18px, 5vw, 28px);
}

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

.brand-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--ink);
  text-transform: uppercase;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  overflow: hidden;
}

.brand-logo svg,
.brand-logo img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* author CSS otherwise overrides the HTML [hidden] UA rule */
.brand-logo svg[hidden],
.brand-logo img[hidden] {
  display: none !important;
}

.lang-wrap {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
}

.lang-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  font: 700 12px 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
}

.app-title {
  margin: 12px 0 0;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(19px, 5.5vw, 23px);
  letter-spacing: .01em;
  text-align: center;
}

.app-subtitle {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 38ch;
  line-height: 1.6;
}

/* Progress */
.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  max-width: 620px;
  background: var(--bg);
  padding: 10px 0 14px;
  margin-bottom: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  gap: 10px;
}

.progress-status {
  font: 700 11px 'Manrope', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.progress-pct {
  font: 700 11px 'Manrope', sans-serif;
  letter-spacing: .02em;
  color: var(--accent);
  white-space: nowrap;
}

.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s ease;
}

/* Card + steps */
.card {
  width: 100%;
  max-width: 620px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 5.5vw, 32px) clamp(18px, 5vw, 30px);
}

.step {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.step.is-active {
  display: flex;
}

.step[data-step="3"].is-active {
  gap: 20px;
}

.step-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font: 700 11px 'Manrope', sans-serif;
  letter-spacing: .03em;
  color: var(--ink-soft);
}

.field-note {
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.input,
.select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  width: 100%;
}

.input:focus,
.select:focus {
  outline: 2px solid var(--accent-tint);
  border-color: var(--accent);
}

.error-box {
  display: none;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-tint);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
}

.error-box.is-visible {
  display: block;
}

.error-box--alert {
  border: 1px solid rgba(200, 64, 64, .35);
  background: rgba(200, 64, 64, .07);
  color: #B03A3A;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-weight: 600;
}

/* Chips */
.chip-group-label {
  display: block;
  margin-bottom: 8px;
  font: 700 11px 'Manrope', sans-serif;
  letter-spacing: .03em;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips--yesno {
  flex-wrap: nowrap;
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: 700 13px 'Manrope', sans-serif;
  cursor: pointer;
  transition: transform .1s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.chip:active {
  transform: scale(.96);
}

.chip.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}

.chip--yesno {
  flex: 1;
  max-width: 120px;
  font-size: 13.5px;
}

/* Review */
.review-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.review-value {
  font-size: 13px;
  color: var(--ink);
  text-align: right;
}

/* Push banners */
.push-banner {
  display: none;
  border-radius: var(--radius-md);
}

.push-banner.is-visible {
  display: flex;
}

.push-banner--need {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  padding: 14px;
  flex-direction: column;
  gap: 10px;
}

.push-banner-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.push-banner-row svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}

.push-banner-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--warn-text);
}

.push-btn {
  min-height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  font: 700 13px 'Manrope', sans-serif;
  cursor: pointer;
}

.push-btn:active {
  transform: scale(.98);
}

.push-banner--ok {
  border: 1px solid rgba(23, 122, 82, .35);
  background: var(--success-tint);
  padding: 12px 14px;
  gap: 10px;
  align-items: center;
  flex-direction: row;
}

.push-banner--ok svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.push-ok-text {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--success);
}

.privacy {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* Done */
.done {
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 20px 0;
}

.done-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.done-icon svg {
  width: 24px;
  height: 24px;
}

.done-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 17px;
}

.done-text {
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 38ch;
  line-height: 1.6;
  margin: 0;
}

/* Sticky nav */
.nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(25, 31, 39, .06);
}

.nav.is-visible {
  display: block;
}

.nav-inner {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px clamp(14px, 4vw, 20px) calc(12px + env(safe-area-inset-bottom));
}

.nav-back {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.nav-back:disabled {
  opacity: .4;
  cursor: default;
}

.nav-back:active:not(:disabled) {
  transform: scale(.94);
}

.nav-back svg {
  width: 19px;
  height: 19px;
}

.nav-next {
  flex: 1;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  font: 700 15px 'Manrope', sans-serif;
  cursor: pointer;
}

.nav-next:active {
  transform: scale(.98);
}

.nav-next:disabled {
  opacity: .7;
  cursor: default;
}
