@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  font-synthesis: none;
  color: #233d3b;
  background: #f5f7f5;
  --green: #164b46;
  --muted: #596e64;
  --border: #d9e2dd;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; touch-action: manipulation; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #85b3a4; outline-offset: 3px; }
[hidden] { display: none !important; }

.site-header { background: #fff; border-bottom: 1px solid #e2e8e3; }
.header-inner { max-width: 672px; padding: 14px 18px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand-logo { display: block; width: 96px; height: auto; flex-shrink: 0; object-fit: contain; }
.brand strong { font-size: 13px; display: block; font-weight: 700; }
.brand div > span { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.header-label { display: none; }
main { max-width: 672px; padding: 24px 16px 12px; margin: auto; }
.intro { margin-bottom: 20px; }
.eyebrow { display: flex; gap: 7px; align-items: center; font-size: 11px; font-weight: 600; color: #568078; margin: 0 0 4px; }
.eyebrow span { height: 6px; width: 6px; border-radius: 50%; background: #648b7d; }
h1 { margin: 0; font-size: 28px; line-height: 1.6; font-weight: 700; }
.intro-description { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.9; }

.form-card { border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 4px 20px #193e3208; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid #e8ede8; gap: 10px; }
.section-heading { display: flex; gap: 10px; align-items: center; }
.section-number { width: 34px; height: 34px; display: grid; place-items: center; background: #edf4ef; border-radius: 9px; font-size: 17px; color: var(--green); font-weight: 600; }
h2 { font-size: 17px; font-weight: 700; margin: 0; }
.section-tag { font-size: 11px; color: #587065; border-radius: 20px; white-space: nowrap; }
.card-content { padding: 22px 18px 20px; }
form { min-width: 0; }
.field { margin-bottom: 23px; }
.last-field { margin-bottom: 0; }
label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 9px; }
.required { color: #a46949; margin-inline-start: 3px; }
.select-wrap { position: relative; }
select, input { width: 100%; min-width: 0; height: 60px; border: 1px solid #cbd8cf; border-radius: 11px; background: #fff; padding: 0 14px; color: #263e3b; font-size: 16px; }
select { appearance: none; padding-inline-end: 39px; text-align: right; }
.select-wrap > svg { position: absolute; inset-inline-end: 14px; top: 21px; pointer-events: none; color: #60786a; width: 18px; height: 18px; }
select:disabled { background: #f6f8f6; color: #7c8982; cursor: default; border-color: #e0e7e1; opacity: 1; }
.hint { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 7px 0 0; overflow-wrap: anywhere; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.automatic { font-size: 10px; color: #63786b; display: flex; align-items: center; gap: 4px; margin-bottom: 9px; }
.automatic svg { width: 14px; height: 14px; stroke-width: 1.4; }
input { text-align: right; }
.civil-field input { background: #f5f8f5; border-style: dashed; letter-spacing: 2px; color: var(--green); font-size: 22px; }
.phone-field input { background: #fff; letter-spacing: 1px; }
.email-field input { background: #f5f8f5; border-style: dashed; font-size: 16px; text-align: left; }
.email-field input:placeholder-shown { text-align: right; }
.email-field.has-value input { background: #eef6f0; border-style: solid; border-color: #9bbfa8; }
input::placeholder { font-size: 13px; letter-spacing: 0; direction: rtl; color: #748378; }
.civil-field.has-value input { background: #eef6f0; border-style: solid; border-color: #9bbfa8; }
.selection-status { display: flex; align-items: center; gap: 7px; color: #356c4c; font-size: 13px; margin-top: 17px; }
.selection-status svg { width: 18px; height: 18px; }
.error-message { color: #8e3e30; font-size: 13px; }
.error-message button { min-height: 48px; padding: 8px 16px; border: 1px solid #d1b4aa; border-radius: 8px; background: #fff; color: #8e3e30; }
.card-footer { border-top: 1px solid #e8ede8; padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: #65796b; }
.card-footer button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; background: none; border: 0; border-radius: 8px; color: var(--green); font-size: 13px; padding: 8px 10px; }
.card-footer button:disabled { color: #87958c; cursor: default; }
.card-footer svg { width: 17px; height: 17px; }

.help-panel { margin-top: 14px; border: 1px solid #e0e7de; border-radius: 12px; background: #eef3ec; }
.help-panel summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 17px; list-style: none; font-size: 13px; color: #48634f; }
.help-panel summary::-webkit-details-marker { display: none; }
.help-panel summary svg { width: 17px; height: 17px; }
.help-panel[open] summary svg { transform: rotate(180deg); }
.help-content { padding: 0 17px 15px; font-size: 13px; color: #526c57; line-height: 2; }
.help-content p { margin: 0 0 8px; }
.help-content p:last-child { margin-bottom: 0; }
.phase-note { font-size: 11px; color: #6d7c6f; margin: 16px 4px 0; line-height: 1.9; text-align: center; }
.site-footer { text-align: center; font-size: 10px; color: #708174; padding: 12px 18px max(22px, env(safe-area-inset-bottom)); line-height: 1.8; }
.site-footer span { padding: 0 4px; }

@media (min-width: 640px) {
  .header-inner { padding: 18px 24px; }
  .header-label { display: block; font-size: 11px; color: var(--muted); }
  main { padding: 38px 24px 18px; }
  h1 { font-size: 32px; }
  .intro { margin-bottom: 25px; }
  .card-header { padding: 21px 26px; }
  .card-content { padding: 26px; }
  .card-footer { padding-inline: 26px; }
  .brand-logo { width: 120px; }
  .brand strong { font-size: 14px; }
}
@media (hover: hover) {
  select:hover:not(:disabled) { border-color: #749b8a; }
  .card-footer button:hover:not(:disabled) { background: #eef5ef; }
  .help-panel summary:hover { background: #e7efe4; border-radius: 12px; }
}

.wizard-progress { margin-bottom: 18px; }
.progress-caption { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.progress-segments { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; }
.progress-segments span { height: 4px; border-radius: 3px; background: #dce5dc; }
.progress-segments span.active { background: #3c7b68; }
h2[tabindex] { scroll-margin-top: 22px; }
h2[tabindex]:focus { outline: none; }
.wizard-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.primary-button,.secondary-button { min-height: 56px; width: 100%; border-radius: 11px; padding: 12px 18px; font-size: 16px; font-weight: 600; cursor: pointer; }
.primary-button { background: var(--green); color: #fff; border: 1px solid var(--green); }
.primary-button:disabled { background: #e0e8e1; border-color: #d5dfd5; color: #647565; cursor: default; }
.secondary-button { background: #fff; color: var(--green); border: 1px solid #cbd8cf; }
.start-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.9; color: var(--muted); text-align: center; }
.start-hint.ready { color: #356c4c; }
.question { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
.question:last-child { margin-bottom: 0; }
.question legend { font-size: 15px; font-weight: 600; line-height: 1.9; padding: 0; margin-bottom: 12px; width: 100%; }
.question > .hint { margin: -4px 0 12px; }
.options { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
.options.binary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.option { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; margin: 0; border: 1px solid #d6e0d6; border-radius: 10px; font-size: 14px; line-height: 1.8; font-weight: 400; background: #fff; cursor: pointer; }
.option:has(input:checked) { background: #edf6ef; border-color: #78a88d; }
.option input { width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--green); }
.option span { overflow-wrap: anywhere; }
textarea { width: 100%; min-height: 108px; padding: 12px 14px; line-height: 1.9; border: 1px solid #cbd8cf; border-radius: 11px; font-size: 16px; resize: vertical; background: #fff; color: #263e3b; }
textarea:focus-visible { outline: 3px solid #85b3a4; outline-offset: 3px; }
.conditional { padding: 16px; border-radius: 12px; background: #f2f6f1; margin-top: -12px; }
.conditional label { line-height: 1.9; }
.field-error { color: #923f2f; font-size: 12px; line-height: 1.8; margin: 8px 0 0; }
.question[aria-invalid="true"] .option { border-color: #bd7e6a; }
.field[aria-invalid="true"] textarea,.field[aria-invalid="true"] .upload-box { border: 1px solid #bd7e6a; }
.upload-box { border: 1px dashed #aac3ac; border-radius: 10px; padding: 12px; background: #fff; }
.upload-box input[type="file"] { min-height: 60px; height: auto; font-size: 13px; padding: 7px 0; border: 0; border-radius: 0; max-width: 100%; background: #fff; }
.upload-box input::file-selector-button { min-height: 44px; padding: 8px 12px; border: 1px solid #cbd8cf; border-radius: 8px; background: #edf3ed; color: var(--green); font: inherit; cursor: pointer; margin-inline-end: 8px; }
.review-intro { margin: 0 0 22px; font-size: 13px; line-height: 1.9; color: var(--muted); }
.review-block { margin-bottom: 26px; }
.review-block h3 { color: var(--green); font-size: 15px; margin: 0 0 12px; }
.review-block dl { margin: 0; }
.review-block dl > div { border-bottom: 1px solid #e8eee7; padding: 12px 0; }
.review-block dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.review-block dd { font-size: 14px; line-height: 1.9; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.success-card { padding: 30px 22px; text-align: center; }
.success-card p { line-height: 1.9; font-size: 14px; }
.success-symbol { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; color: #356c4c; background: #e9f3e8; font-size: 25px; }
.receipt { font-size: 13px !important; overflow-wrap: anywhere; font-family: ui-monospace,monospace; }
.success-card .secondary-button { margin-top: 20px; }
.email-field input:not([readonly]) { border-style: solid; background: #fff; }
