:root {
  --orange: #E97524;
  --navy: #25215F;
  --ink: #2B2A3A;
  --muted: #7A7891;
  --line: #CFCCDB;
  --paper: #FFFFFF;
  --page: #F3F2F7;
  --danger: #B42318;
  --ar-display: 'Amiri', 'Times New Roman', serif;
  --ar-text: 'Readex Pro', Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--ar-text);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  background: var(--paper);
  padding: 0 24px 32px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  body { padding: 48px 16px; }
  .sheet { min-height: auto; padding: 0 56px 40px; box-shadow: 0 1px 2px rgba(37, 33, 95, .06), 0 12px 40px rgba(37, 33, 95, .08); }
}

.masthead {
  text-align: center;
  padding: 48px 0 28px;
  border-bottom: 1px solid #E6E4EE;
}
.logo { width: 188px; height: auto; display: block; margin: 0 auto 28px; }
.masthead h1 {
  font-family: var(--ar-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.125rem);
  line-height: 1.3;
  color: var(--navy);
  margin: 0;
}
.sub { margin: 10px 0 0; color: var(--navy); font-size: 1.25rem; font-weight: 600; text-align: center; }
.sub-small { margin: 4px 0 0; color: var(--muted); font-size: .9375rem; font-weight: 400; text-align: center; }

/* Form */
.form { padding-top: 12px; }

.field { padding: 26px 0 0; }
.field label, .field .label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--navy);
}
.en {
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Readex Pro', Arial, sans-serif;
}

.field input {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  padding: 12px 2px 10px;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: #BAB7C9; }
.field input:focus { border-bottom-color: var(--orange); box-shadow: 0 1.5px 0 var(--orange); }

.has-error input { border-bottom-color: var(--danger); }
.err { margin: 8px 0 0; font-size: .875rem; color: var(--danger); }

.is-fixed .fixed-value {
  margin: 0;
  padding: 12px 2px 10px;
  font-size: 1.125rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--line);
}

.hp { position: absolute; inset-inline-start: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

.alert {
  margin: 20px 0 0;
  padding: 12px 14px;
  background: #FDF1EF;
  border-inline-start: 3px solid var(--danger);
  color: var(--danger);
  font-size: .9375rem;
}

.submit {
  margin-top: 40px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 2px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s;
}
.submit:hover { background: #1B1847; }
.submit:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.submit:disabled { opacity: .7; cursor: progress; }

/* Thank-you state */
.thanks { text-align: center; padding: 40px 4px 8px; }
.check { width: 64px; height: 64px; margin: 0 auto 18px; display: block; }
.check circle { fill: none; stroke: var(--orange); stroke-width: 2; }
.check path {
  fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .2s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks h2 { font-family: var(--ar-display); font-size: 1.75rem; color: var(--navy); margin: 0 0 8px; }
.thanks p { color: var(--muted); max-width: 34ch; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .check path { animation: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}
