:root {
  --bg: #f5f2f8;
  --surface: #ffffff;
  --text: #221f2b;
  --muted: #625d6e;
  --line: #e7e1ee;
  --line-strong: #d3cbdd;
  --primary: #5a3b8c;
  --primary-dark: #45296f;
  --primary-ink: #ffffff;
  --primary-soft: #f1ebf9;
  --primary-ring: rgba(90, 59, 140, .22);
  --accent: #e8927c;
  --accent-soft: #fdf0eb;
  --danger: #a51d2d;
  --danger-soft: #fdecee;
  --warn-soft: #fff5d9;
  --ok: #2d7a55;
  --ok-soft: #e5f4ec;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(34, 31, 43, .05), 0 8px 24px rgba(34, 31, 43, .06);
  --shadow-lg: 0 2px 4px rgba(45, 27, 74, .04), 0 18px 48px rgba(45, 27, 74, .10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 50% -120px, var(--primary-soft), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
h1, h2, h3, legend { letter-spacing: -.02em; }

/* --- Emergjenca dhe dalja e shpejtë --- */
.emergency {
  background: #2a1d3f;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  padding-right: 150px;
  font-size: 15px;
}
.emergency-call {
  color: #fff;
  font-weight: 600;
  background: #c62f3f;
  border: 1px solid #d94a59;
  border-radius: 999px;
  padding: 3px 12px;
  text-decoration: none;
  white-space: nowrap;
}
.emergency-call:hover { background: #d63a4a; }

.quick-exit {
  position: fixed;
  top: 6px;
  right: 8px;
  z-index: 100;
  background: #fff;
  color: #2a1d3f;
  border: 2px solid #2a1d3f;
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.quick-exit:hover { background: #f1ebf9; }

/* --- Koka --- */
.top { padding: 18px 16px 6px; max-width: 680px; margin: 0 auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { width: 34px; height: 34px; flex: none; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 32px; }

/* --- Faqja kryesore --- */
.hero { padding: 18px 0 4px; }
.hero h1 { font-size: 40px; line-height: 1.1; margin: 0 0 12px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.lead { font-size: 19px; color: var(--muted); margin: 0; }

.trust { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.trust svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

.big-actions { display: grid; gap: 12px; margin: 28px 0; }
.big-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.big-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.big-btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  color: var(--primary-ink);
}
.big-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--primary-soft);
  color: var(--primary);
}
.big-btn.primary .big-btn-icon { background: rgba(255,255,255,.16); color: #fff; }
.big-btn-icon svg { width: 24px; height: 24px; }
.big-btn-text { flex: 1; min-width: 0; }
.big-btn-title { display: block; font-size: 21px; font-weight: 750; line-height: 1.25; }
.big-btn-sub { display: block; opacity: .8; font-size: 16px; }
.big-btn-arrow { font-size: 22px; opacity: .7; flex: none; }

.how h2 { font-size: 22px; margin: 8px 0 12px; }
.how-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: how; }
.how-list li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 17px;
}
.how-list li::before {
  content: counter(how);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: #b2533b;
  font-weight: 800;
}
.how-list strong { display: block; font-size: 18px; }
.how-list span { color: var(--muted); }

/* --- Karta dhe forma --- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

label { display: block; font-weight: 650; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fcfbfd;
  color: var(--text);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
input::placeholder, textarea::placeholder { color: #9c96a6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235a3b8c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center / 20px;
}
textarea { resize: vertical; min-height: 120px; }

.field { margin: 20px 0; }
.hint { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.q { font-weight: 650; margin: 0 0 10px; }
.req { color: var(--danger); }
.field-error {
  color: var(--danger);
  font-weight: 600;
  margin: 8px 0 0;
  font-size: 16px;
}
.field-error::before { content: "! "; font-weight: 800; }

/* --- Zgjedhjet si pllaka --- */
.choices { display: grid; gap: 10px; }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.choices.two-col { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.choices ul, .choices li { list-style: none; margin: 0; padding: 0; }
.choice {
  display: flex;
  gap: 14px;
  align-items: center;
  font-weight: 550;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 15px 16px;
  cursor: pointer;
  margin: 0;
  line-height: 1.35;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.choice:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--primary-ring); }

/* Rrathë dhe kuti të vizatuara vetë, më të mëdha dhe më të qarta se ato të shfletuesit. */
.choice input, .check input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  flex: none;
  border: 2px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.choice input[type=radio] { border-radius: 50%; }
.choice input[type=checkbox], .check input[type=checkbox] { border-radius: 7px; }
.choice input:checked, .check input:checked { border-color: var(--primary); background: var(--primary); }
.choice input[type=radio]:checked { box-shadow: inset 0 0 0 4px #fff; }
.choice input[type=checkbox]:checked, .check input[type=checkbox]:checked {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") no-repeat center / 16px;
}
.check input:focus-visible { box-shadow: 0 0 0 4px var(--primary-ring); outline: none; }

/* Pyetjet e rrezikut: butona të ngjitur (Po / Jo / Nuk e di), që zënë një rresht edhe në telefon. */
.risk-q {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.risk-q:last-child { padding-bottom: 4px; }
.risk-q .q { margin: 0 0 12px; font-size: 17px; }
.choices.compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 3px;
}
.choices.compact .choice {
  justify-content: center;
  text-align: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 10px 4px;
  font-size: 16px;
  white-space: nowrap;
}
.choices.compact .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choices.compact .choice:has(input:checked) {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(34,31,43,.2);
}
.choices.compact .choice:has(input[value=po]:checked) { background: var(--danger); }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 550; cursor: pointer; }
.check input { margin-top: 1px; }

/* --- Prova: zonë ngarkimi --- */
.dropzone {
  display: block;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fcfbfd;
  padding: 24px 18px;
  text-align: center;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--primary); display: block; margin: 0 auto 8px; }
.dropzone strong { display: block; color: var(--text); font-size: 18px; }
.dropzone input[type=file] { font: inherit; font-size: 15px; width: 100%; margin-top: 14px; color: var(--muted); }
input[type=file]::file-selector-button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-right: 12px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

/* --- Forma me hapa --- */
.wizard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 28px 32px 0;
  margin-top: 8px;
}
.wizard fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.wizard legend { font-size: 28px; line-height: 1.2; font-weight: 800; margin-bottom: 8px; padding: 0; }
.wizard.js .step { display: none; }
.wizard.js .step.active { display: block; }
.wizard:not(.js) #next, .wizard:not(.js) #prev { display: none; }
.wizard:not(.js) .step { margin-bottom: 40px; }

.wizard-head { padding: 0 0 24px; }
.step-count {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
}
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #8a5fc8);
  transition: width .25s ease;
}

.wizard-nav {
  display: flex;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 16px -32px 0;
  padding: 16px 32px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 0 0 24px 24px;
}
.wizard-nav .btn { flex: 1; margin: 0; }
.wizard-nav #prev { flex: 0 0 auto; padding-left: 18px; padding-right: 18px; }

.safe-note {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
  text-align: center;
}
.safe-note svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }

/* --- Butonat --- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  border-radius: 14px;
  padding: 15px 22px;
  border: 1.5px solid var(--primary);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 14px;
  transition: background .12s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px var(--primary-ring); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.primary:disabled { opacity: .7; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--primary); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--primary); }
.btn.block { display: block; width: 100%; }
.btn[hidden] { display: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }

/* --- Njoftimet --- */
.alert {
  background: var(--warn-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  border-left: 4px solid #e0b43c;
}
.alert.danger { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }
.alert.danger a { color: var(--danger); font-weight: 800; }
.alert.ok { background: var(--ok-soft); border-left-color: var(--ok); }

/* --- Faqja e kodit --- */
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok-soft);
  color: var(--ok);
  margin: 8px 0 16px;
}
.success-icon svg { width: 32px; height: 32px; }
.code-box {
  font: 700 34px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 3px;
  text-align: center;
  color: var(--primary-dark);
  background: var(--surface);
  border: 2.5px dashed var(--primary);
  border-radius: var(--radius);
  padding: 26px 12px;
  margin: 22px 0;
  user-select: all;
  overflow-wrap: anywhere;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.status-label { font-weight: 800; font-size: 22px; margin: 0 0 6px; }

.hp { position: absolute; left: -9999px; }

/* --- Fundi --- */
.foot {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0 0 8px; }
kbd {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 14px;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .emergency { justify-content: flex-start; padding-right: 128px; font-size: 14px; }
  .quick-exit { padding: 7px 12px; font-size: 14px; }
  .hero h1 { font-size: 32px; }
  .big-btn { padding: 16px; gap: 14px; }
  .big-btn-icon { width: 44px; height: 44px; }
  .card { padding: 20px; }
  .wizard { padding: 20px 18px 0; border-radius: 20px; }
  .wizard legend { font-size: 24px; }
  .wizard-nav { margin: 12px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-radius: 0 0 20px 20px; }
}
