:root {
  --navy: #042750;
  --navy-2: #0a376d;
  --gold: #8e772d;
  --gold-light: #c8a94b;
  --paper: #ffffff;
  --cream: #f7f4ee;
  --ink: #13213a;
  --muted: #667085;
  --line: #ded8ca;
  --danger: #b42318;
  --success: #147d55;
  --shadow: 0 20px 60px rgba(4, 39, 80, 0.12);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #f4f0e7 0, #fff 460px);
  color: var(--ink);
  font-family: "Thmanyah Sans", "Traditional Arabic", Tahoma, Arial, sans-serif;
  line-height: 1.75;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
.skip-link {
  position: fixed;
  top: -80px;
  right: 1rem;
  z-index: 1000;
  background: #fff;
  padding: 0.7rem 1rem;
  border-radius: 8px;
}
.skip-link:focus {
  top: 1rem;
}
.site-header {
  min-height: 92px;
  padding: 12px clamp(18px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.brand img {
  display: block;
  width: 155px;
  height: 66px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.back-site {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1rem;
}
.back-site:hover,
.back-site:focus-visible {
  background: #fff;
  color: var(--navy);
}
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 60px;
}
.hero {
  max-width: 820px;
  margin: 58px auto 34px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.2;
}
.hero > p:not(.eyebrow) {
  margin: 18px auto;
  max-width: 760px;
  color: #4f5d73;
  font-size: 1.12rem;
}
.notice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(142, 119, 45, 0.1);
  color: #6a571d;
  border: 1px solid rgba(142, 119, 45, 0.28);
  padding: 10px 16px;
  border-radius: 12px;
}
.form-card {
  background: #fff;
  border: 1px solid #e8e1d4;
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.progress-wrap {
  padding: 26px clamp(18px, 4vw, 46px) 22px;
  background: #fbfaf7;
  border-bottom: 1px solid var(--line);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--navy);
  font-weight: 800;
}
.progress-track {
  height: 7px;
  background: #e5e0d5;
  border-radius: 20px;
  margin: 9px 0 18px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 16.666%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.25s ease;
}
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  color: #7a8496;
  font-size: 0.82rem;
}
.step-list li {
  text-align: center;
}
.step-list li.is-active {
  color: var(--navy);
  font-weight: 800;
}
.message {
  margin: 24px 40px 0;
  padding: 13px 16px;
  border-radius: 10px;
  background: #fff1f0;
  border: 1px solid #f3b5b1;
  color: var(--danger);
}
form {
  padding: clamp(24px, 5vw, 52px);
}
.form-step {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.form-step.is-active {
  display: block;
  animation: fade 0.2s ease;
}
@keyframes fade {
  from {
    opacity: 0.25;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
legend {
  width: 100%;
  padding: 0;
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 900;
}
legend span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 8px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  vertical-align: 4px;
}
.section-help {
  margin: 0 0 28px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  gap: 20px;
}
.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.three-columns {
  grid-template-columns: 1fr 1fr 0.8fr;
}
.full-width {
  grid-column: 1 / -1;
}
.field {
  display: grid;
  gap: 7px;
  align-content: start;
}
.field > span {
  color: #263750;
  font-weight: 700;
}
.field b,
.consent-row b {
  color: var(--danger);
}
.field small {
  font-weight: 400;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #cfc9bd;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition:
    border 0.15s,
    box-shadow 0.15s;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(142, 119, 45, 0.13);
}
.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1) !important;
}
.counter {
  text-align: left;
  color: var(--muted);
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.check-card {
  position: relative;
  display: block;
}
.check-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check-card span {
  display: grid;
  place-items: center;
  min-height: 62px;
  padding: 10px;
  text-align: center;
  border: 1px solid #d6d0c4;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  transition: 0.15s;
}
.check-card input:checked + span {
  border-color: var(--gold);
  background: rgba(142, 119, 45, 0.09);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.check-card input:focus-visible + span {
  outline: 3px solid rgba(142, 119, 45, 0.25);
}
.check-card.wide {
  grid-column: span 2;
}
.conditional {
  margin-top: 22px;
}
.subsection-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 36px 0 14px;
}
.subsection-heading h2,
.deadline-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.25rem;
}
.subsection-heading p,
.deadline-card p {
  margin: 3px 0 0;
  color: var(--muted);
}
.parties-list {
  display: grid;
  gap: 14px;
}
.party-card,
.claim-card,
.deadline-card {
  border: 1px solid var(--line);
  background: #fbfaf7;
  border-radius: 14px;
  padding: 18px;
}
.party-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.party-heading h3 {
  margin: 0;
  color: var(--navy);
}
.remove-party {
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 5px 8px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-weight: 700;
}
.switch-row input,
.consent-row input,
.radio-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex: none;
}
.represented {
  align-self: end;
  min-height: 52px;
}
.info-box {
  background: #f7f0d8;
  border-right: 4px solid var(--gold);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.claims-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.claim-fields {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.spaced-top {
  margin-top: 30px;
}
.deadline-card {
  margin-top: 24px;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.radio-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
}
.calendar-note {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.consent-row {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fbfaf7;
}
.consent-row input {
  margin-top: 5px;
}
.form-navigation,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.form-navigation {
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.primary-button,
.secondary-button {
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 800;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.primary-button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
}
.secondary-button {
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
}
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(4, 39, 80, 0.12);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none !important;
}
.review-content {
  display: grid;
  gap: 16px;
}
.review-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.review-section h2 {
  margin: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  font-size: 1rem;
}
.review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.review-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eee9e0;
  min-width: 0;
}
.review-item.full {
  grid-column: 1 / -1;
}
.review-item dt {
  color: var(--muted);
  font-size: 0.84rem;
}
.review-item dd {
  margin: 3px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.final-actions {
  margin-top: 24px;
}
.action-note {
  color: var(--muted);
  font-size: 0.9rem;
}
.success-panel {
  padding: 60px 30px;
  text-align: center;
}
.success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e8f7f1;
  color: var(--success);
  font-size: 2rem;
  font-weight: 900;
}
.success-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 2rem;
}
.success-panel strong {
  display: inline-block;
  margin: 15px 0;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}
.success-panel .final-actions {
  justify-content: center;
}
.privacy-note {
  margin: 24px auto 0;
  max-width: 850px;
  text-align: center;
  color: var(--muted);
}
.privacy-note h2 {
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.privacy-note p {
  margin-top: 0;
}
.site-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px;
  background: var(--navy);
  color: #fff;
  border-top: 3px solid var(--gold);
}
.honeypot {
  position: absolute !important;
  right: -10000px !important;
  opacity: 0 !important;
}

.pdf-root {
  position: fixed;
  left: -10000px;
  top: 0;
  visibility: hidden;
}
.pdf-page {
  width: 210mm;
  height: 297mm;
  padding: 14mm 16mm 12mm;
  background: #fff;
  color: #111827;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  page-break-after: always;
  font-family: "Thmanyah Sans", "Traditional Arabic", Tahoma, Arial, sans-serif;
}
.pdf-page:last-child {
  page-break-after: auto;
}
.pdf-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8mm;
  border-bottom: 1.5px solid var(--gold);
}
.pdf-header img {
  width: 35mm;
  height: 24mm;
  object-fit: contain;
}
.pdf-header.is-small img {
  width: 22mm;
  height: 15mm;
}
.pdf-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: 18pt;
  line-height: 1.4;
}
.pdf-header p {
  margin: 2px 0 0;
  color: #4b5563;
  font-size: 9.5pt;
}
.pdf-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-top: 7mm;
}
.pdf-block {
  border: 1px solid #ddd6c9;
  border-radius: 3mm;
  margin-bottom: 3.2mm;
  padding: 3mm 4mm;
  break-inside: avoid;
}
.pdf-block h2 {
  margin: 0 0 1mm;
  color: var(--gold);
  font-size: 10pt;
}
.pdf-block p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 10.5pt;
  line-height: 1.65;
}
.pdf-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4mm;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 8.5pt;
}

@media (max-width: 820px) {
  .step-list {
    display: none;
  }
  .two-columns,
  .three-columns,
  .claims-grid,
  .review-list {
    grid-template-columns: 1fr;
  }
  .full-width,
  .review-item.full {
    grid-column: auto;
  }
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .check-card.wide {
    grid-column: 1 / -1;
  }
  .subsection-heading {
    align-items: start;
    flex-direction: column;
  }
  .represented {
    align-self: start;
  }
}
@media (max-width: 560px) {
  .site-header {
    min-height: 74px;
    padding: 9px 14px;
  }
  .brand img {
    width: 118px;
    height: 50px;
  }
  .back-site {
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
  }
  .page-shell {
    width: min(100% - 20px, 1120px);
  }
  .hero {
    margin: 34px auto 24px;
  }
  .hero > p:not(.eyebrow) {
    font-size: 1rem;
  }
  .notice {
    align-items: start;
    text-align: right;
  }
  .form-card {
    border-radius: 16px;
  }
  form {
    padding: 24px 16px;
  }
  .progress-wrap {
    padding: 18px 16px;
  }
  .message {
    margin: 16px 16px 0;
  }
  .option-grid {
    grid-template-columns: 1fr;
  }
  .check-card.wide {
    grid-column: auto;
  }
  .form-navigation button,
  .final-actions button {
    flex: 1;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }
  body > *:not(.pdf-root) {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
  .pdf-root.is-ready {
    position: static;
    left: auto;
    visibility: visible;
    display: block !important;
  }
  .pdf-page {
    box-shadow: none;
    margin: 0;
  }
}
