
:root {
  --bg: #f5f8f7;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4ee;
  --brand: #0f766e;
  --brand2: #0b1324;
  --white: #ffffff;
  --green: #16a34a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(20,184,166,.18), transparent 30%),
    radial-gradient(circle at 92% 5%, rgba(15,118,110,.18), transparent 30%),
    var(--bg);
  color: var(--ink);
}
.page { max-width: 1180px; margin: 0 auto; padding: 18px; }
.hero {
  margin: 0 0 24px;
  padding: 36px;
  border-radius: 32px;
  color: white;
  background:
    radial-gradient(circle at 20% 0%, rgba(20,184,166,.35), transparent 25%),
    radial-gradient(circle at 80% 30%, rgba(20,184,166,.32), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #111827 50%, #0f766e 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}
.badge {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 28px;
}
.hero-grid { display: grid; grid-template-columns: 1.8fr .9fr; gap: 28px; align-items: end; }
h1 { font-size: clamp(36px, 6vw, 66px); line-height: .96; margin: 0 0 18px; letter-spacing: -0.06em; }
.hero p { color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.7; margin: 0; max-width: 740px; }
.progress-card {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.11);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(10px);
}
.progress-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.progress-bar { height: 9px; background: rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; }
#progressFill { height: 100%; width: 0%; background: white; border-radius: 999px; transition: .3s; }
.layout { display: grid; grid-template-columns: 1.35fr .85fr; gap: 24px; }
.left { display: grid; gap: 20px; }
.card, .summary, .trust {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}
.title-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.title-row > span:first-child {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 15px; background: var(--brand2); color: white; font-weight: 800;
}
h2 { font-size: 19px; margin: 0; letter-spacing: -.02em; }
.hint { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.micro-hint { color: var(--muted); margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option {
  min-height: 52px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 12px 14px;
  color: #263449;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: .2s;
}
.option span {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid #cbd5e1; flex: 0 0 20px;
}
.option:hover, .check-option:hover { border-color: #94a3b8; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,.06); }
.option.active {
  background: var(--brand2);
  color: white;
  border-color: var(--brand2);
  box-shadow: 0 16px 28px rgba(15,23,42,.18);
}
.option.active span { border-color: white; background: white; box-shadow: inset 0 0 0 5px var(--brand2); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check-option {
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: .2s;
  font-weight: 500;
  color: #263449;
}
.check-option input, .consent input { width: auto; margin: 0; accent-color: var(--brand2); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-weight: 700; font-size: 13px; color: #334155; }
input, textarea, select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  font: inherit;
  outline: none;
  background: white;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,118,110,.1); }
.wide { grid-column: 1 / -1; }
.conditional {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #cbd5e1;
}
.conditional.show { display: block; }
.highlight-block {
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
  border: 1px solid #bae6fd;
  border-radius: 22px;
  padding: 18px;
}
.modern-dates {
  background: linear-gradient(135deg, #f8fafc, #ecfdf5);
  border: 1px solid #d1fae5;
  border-radius: 22px;
  padding: 18px;
}
.mini-title {
  font-weight: 800;
  color: var(--brand2);
  margin-bottom: 12px;
}
.mt { display: block; margin-top: 14px; }
.consent-card { padding: 18px 24px; }
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}
.right { min-width: 0; }
.sticky { position: sticky; top: 18px; display: grid; gap: 18px; }
.summary-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.summary-head > div:first-child, .trust > div:first-child {
  width: 44px; height: 44px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--brand2); color: white;
}
.summary-head p, .trust p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  min-height: 410px;
  color: #334155;
  line-height: 1.55;
  font-family: inherit;
  font-size: 14px;
}
.copy, .whatsapp, .submit {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 16px;
  font-weight: 800;
  font-size: 15px;
  margin-top: 12px;
  cursor: pointer;
  text-align: center;
  display: block;
  text-decoration: none;
}
.copy { background: white; border: 1px solid var(--line); color: var(--ink); }
.whatsapp { background: var(--green); color: white; }
.submit { background: var(--brand2); color: white; }
.small { color: var(--muted); line-height: 1.6; font-size: 12px; margin-top: 14px; }
.trust { display: flex; gap: 14px; align-items: flex-start; }
.trust h3 { margin: 0; font-size: 19px; }
.hidden { display: none; }
@media (max-width: 900px) {
  .hero { padding: 26px; border-radius: 26px; }
  .hero-grid, .layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 560px) {
  .page { padding: 12px; }
  .hero { padding: 22px; }
  .options, .fields, .check-grid { grid-template-columns: 1fr; }
  h1 { font-size: 40px; }
  .card, .summary, .trust { padding: 18px; border-radius: 22px; }
}

.date-warning {
  display: block;
  margin: 4px 0 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}

.country-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10) !important;
}

.calendar-only {
  cursor: pointer;
  caret-color: transparent;
  user-select: none;
}
.calendar-only::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
}

.validation-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.validation-note.ok {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}
.disabled-action {
  opacity: 0.55;
  filter: grayscale(0.2);
}
.field-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10) !important;
}
.card-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .08), 0 20px 50px rgba(15, 23, 42, .08) !important;
}

.card-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10), 0 20px 50px rgba(15, 23, 42, .08) !important;
}
.card-invalid .title-row h2::after {
  content: " — заполните";
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
}
.validation-note {
  white-space: normal;
}

.text-only, .numeric-only {
  ime-mode: auto;
}

.autosave-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.placeholder-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  color: #64748b;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
}
.date-warning.soft-warning {
  color: #b45309;
}

.optional-label {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}
h2 .optional-label {
  font-size: 11px;
}

.success-screen {
  width: min(680px, 100%);
  margin: 80px auto;
  padding: 38px;
  border-radius: 32px;
  background: white;
  border: 1px solid #dbe4ee;
  box-shadow: 0 24px 60px rgba(15,23,42,.12);
  text-align: center;
}
.success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #0b1324;
  color: white;
  font-size: 32px;
}
.success-screen h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 48px);
  letter-spacing: -0.05em;
  color: #0f172a;
}
.success-screen p {
  max-width: 520px;
  margin: 0 auto 24px;
  color: #64748b;
  line-height: 1.7;
}
.success-link {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 18px;
  background: #0b1324;
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 18px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 22px;
}
.brand-logo {
  width: min(420px, 82vw);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, .10));
}
@media (max-width: 560px) {
  .site-header {
    margin: 2px 0 12px;
  }
  .brand-logo {
    width: min(320px, 90vw);
  }
}

/* Compact premium header */
.site-header {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  max-width: 1180px;
  margin: 4px auto 16px !important;
}
.brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(219,228,238,.9) !important;
  box-shadow: 0 14px 30px rgba(15,23,42,.08) !important;
  backdrop-filter: blur(10px);
  text-decoration: none !important;
}
.brand-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
  object-fit: cover !important;
  display: block !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.14);
}
.brand-logo {
  display: none !important;
}
.brand-name {
  color: #071733;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
}
@media (max-width: 560px) {
  .site-header {
    justify-content: center !important;
    margin: 0 auto 12px !important;
  }
  .brand-link {
    padding: 9px 12px !important;
    gap: 10px !important;
  }
  .brand-icon {
    width: 42px !important;
    height: 42px !important;
  }
  .brand-name {
    font-size: 19px;
  }
}

/* Success screen branded icon */
.success-brand {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
}
.success-brand img {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 18px 32px rgba(15,23,42,.16);
}
.success-check {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #16a34a;
  color: white;
  border: 4px solid white;
  font-size: 17px;
  font-weight: 900;
}

.language-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(219,228,238,.9);
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: 13px;
  cursor: pointer;
}
.lang-btn.active { background: var(--brand2); color: #fff; }
.site-header { gap: 12px; flex-wrap: wrap; }
html[data-lang="tk"] .card-invalid .title-row h2::after { content: " — dolduryň"; }
@media (max-width: 560px) {
  .language-switch { width: 100%; justify-content: center; }
  .lang-btn { flex: 1; }
}

/* Better spacing for Turkmen headings */
html[data-lang="tk"] h1 {
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-size: clamp(34px, 5.2vw, 62px);
}
html[data-lang="tk"] .hero p,
html[data-lang="tk"] .progress-card p {
  line-height: 1.75;
}
html[data-lang="tk"] .title-row h2 {
  letter-spacing: -0.02em;
}

/* Polished bilingual typography */
html[data-lang="tk"] h1 {
  line-height: 1.14 !important;
  letter-spacing: -0.012em !important;
  font-size: clamp(32px, 5vw, 60px) !important;
}
html[data-lang="tk"] .hero p,
html[data-lang="tk"] .progress-card p,
html[data-lang="tk"] .hint,
html[data-lang="tk"] .small,
html[data-lang="tk"] .validation-note,
html[data-lang="tk"] .autosave-note {
  line-height: 1.7;
}
html[data-lang="tk"] .title-row h2,
html[data-lang="tk"] h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* v33: smoother Turkmen typography and stable form controls */
html[data-lang="tk"] label,
html[data-lang="tk"] .hint,
html[data-lang="tk"] .small,
html[data-lang="tk"] .sub-card label,
html[data-lang="tk"] .validation-note,
html[data-lang="tk"] .autosave-note {
  font-weight: 500 !important;
}

html[data-lang="tk"] input,
html[data-lang="tk"] textarea,
html[data-lang="tk"] select,
html[data-lang="tk"] .option,
html[data-lang="tk"] .fake-select input {
  font-weight: 500 !important;
}

html[data-lang="tk"] input::placeholder,
html[data-lang="tk"] textarea::placeholder {
  font-weight: 500 !important;
  color: #68758a;
}

html[data-lang="tk"] .sub-card {
  color: #0f172a;
}

html[data-lang="tk"] .title-row h2,
html[data-lang="tk"] .card h2 {
  font-weight: 800;
}

html[data-lang="tk"] .sub-card h3 {
  font-weight: 700;
}


/* v35 final polish: prevent optional badges from turning into black number blocks */
.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.title-row h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  line-height: 1.25;
}
.title-row h2 .optional-label,
.title-row .optional-label {
  width: auto !important;
  height: auto !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  margin-left: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}
html[data-lang="tk"] .title-row h2 .optional-label,
html[data-lang="tk"] .title-row .optional-label {
  font-weight: 700 !important;
}
#detailsInput {
  min-height: 150px;
}
html[data-lang="tk"] .validation-note {
  font-size: 12px;
}
@media (max-width: 620px) {
  .title-row { align-items: flex-start; }
  .title-row h2 { padding-top: 4px; }
}





/* v38: premium floating WhatsApp / Telegram contact buttons */
.floating-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.floating-contact__btn {
  pointer-events: auto;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -0.012em;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
  border: 1px solid rgba(255, 255, 255, .38);
  backdrop-filter: blur(10px);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.floating-contact__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
  filter: brightness(1.03);
}

.floating-contact__btn--whatsapp {
  background: linear-gradient(180deg, #21bf62, #159947);
}

.floating-contact__btn--telegram {
  background: linear-gradient(180deg, #2aa9e8, #0b7ec1);
}

.floating-contact__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.floating-contact__text {
  font-size: 13.5px;
  line-height: 1;
}

@media (max-width: 760px) {
  .floating-contact {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 8px;
  }

  .floating-contact__btn {
    flex: 1;
    min-height: 46px;
    padding: 0 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  }

  .floating-contact__text {
    font-size: 13px;
  }

  body {
    padding-bottom: 74px;
  }
}
