:root {
  --ink: #17201d; --muted: #5d6965; --line: #e3e6e1; --surface: #fff; --canvas: #f4f5f1;
  --brand: #0f5b4f; --brand-deep: #082a25; --brand-soft: #e4f0ec; --gold: #a8823a; --gold-soft: #f7efdc;
  --danger: #b42318; --danger-soft: #fdecea; --ok: #127a43; --ok-soft: #e5f4ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); }
body { font: 16px/1.7 "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.bar { background: var(--brand-deep); color: #fff; font-weight: 600; }
.bar .wrap { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--gold), #d8b56a); }
main { padding-top: 28px; padding-bottom: 24px; }
h1 { font-size: 1.5rem; line-height: 1.4; margin: 0 0 8px; }
.intro { white-space: pre-line; color: var(--muted); margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 1px 3px rgb(16 40 34 / .05); }
.field { margin-bottom: 18px; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.req { color: var(--danger); }
.help { display: block; color: var(--muted); font-size: .875rem; margin-top: -2px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url], textarea, select {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #cfd5cf; border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
.file { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 56px; border: 1px dashed #b9c2bb; border-radius: 10px; background: var(--canvas); }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-button { flex: none; background: var(--surface); border: 1px solid #cfd5cf; border-radius: 8px; padding: 6px 14px; font-weight: 600; }
.file-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: auto; }
.file:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.file:has([aria-invalid=true]) { border-color: var(--danger); }
.choice { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 400; }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); }
.row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[aria-invalid=true] { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: .875rem; margin-top: 4px; }
.consent { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; font-size: .9375rem; }
.consent ul { margin: 6px 0 10px; padding-inline-start: 20px; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; background: var(--brand); color: #fff; padding: 12px 22px; min-height: 48px; cursor: pointer; width: 100%; }
button:disabled { opacity: .6; cursor: progress; }
.note { border-radius: 10px; padding: 12px 14px; }
.note.bad { background: var(--danger-soft); color: var(--danger); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.muted { color: var(--muted); }
.ref { font: 600 1.75rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; direction: ltr; display: inline-block; background: var(--gold-soft); color: var(--brand-deep); padding: 8px 16px; border-radius: 10px; margin: 8px 0; }
.foot { color: var(--muted); font-size: .8125rem; padding-bottom: 32px; }
[dir=ltr] { text-align: left; }
