:root {
  --ink: #1c2b3a;
  --navy: #16324f;
  --navy-deep: #0e2135;
  --gold: #b8863b;
  --gold-soft: #e4c88f;
  --cream: #f6f2ea;
  --paper: #fffdf8;
  --line: #dcd3c0;
  --good: #3f6b4f;
  --danger: #a4402f;
  --shadow: 0 10px 30px rgba(14, 33, 53, .08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1200px 600px at 90% -10%, #eee3c9 0%, transparent 60%),
    var(--cream);
  color: var(--ink);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.9;
  min-height: 100vh;
}

.Wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

header.Top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.Brand {
  font-family: 'Amiri', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-deep);
}

.Brand small {
  display: block;
  font-family: 'Tajawal';
  font-weight: 400;
  font-size: .72rem;
  color: #7a7263;
  margin-top: 2px;
}

.ProgressShell {
  margin: 10px 0 26px;
}

.ProgressTrack {
  height: 6px;
  border-radius: 6px;
  background: #e7ded0;
  overflow: hidden;
}

.ProgressFill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 6px;
  transition: width .35s ease;
}

.ProgressLabel {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: #8a8170;
  margin-top: 6px;
}

.Card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
  animation: rise .35s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.Eyebrow {
  color: var(--gold);
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 6px;
}

h1.StepTitle {
  font-family: 'Amiri', serif;
  font-size: 1.65rem;
  color: var(--navy-deep);
  margin: 0 0 6px;
  line-height: 1.5;
}

.StepSub {
  color: #5c5548;
  font-size: .95rem;
  margin-bottom: 22px;
}

.StepBody {
  margin-bottom: 0;
}

.Prose p {
  margin: 0 0 14px;
  color: #2c2a24;
  font-size: 1.01rem;
}

.Prose strong {
  color: var(--navy-deep);
}

.Letterhead {
  text-align: center;
  margin-bottom: 20px;
}

.Letterhead .Org {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: var(--navy-deep);
  font-size: 1.05rem;
}

.Letterhead .Org small {
  display: block;
  font-size: .85rem;
  color: #7a7263;
  font-weight: 400;
}

.Signoff {
  margin-top: 22px;
  text-align: center;
}

.Signoff .Name {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: var(--navy-deep);
}

.GlossaryItem {
  border-right: 3px solid var(--gold-soft);
  padding: 6px 16px 6px 4px;
  margin-bottom: 16px;
}

.GlossaryItem .Term {
  font-weight: 700;
  color: var(--navy-deep);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 26px;
}

legend {
  font-weight: 700;
  color: var(--navy-deep);
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 0;
}

.QNote {
  font-size: .85rem;
  color: #8a8170;
  margin: -6px 0 12px;
}

.Options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.Opt {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.Opt:hover {
  border-color: var(--gold-soft);
}

.Opt input {
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
  flex: none;
}

.Opt.Checked {
  border-color: var(--gold);
  background: #fbf5e8;
}

.Opt span {
  font-size: .97rem;
}

.Likert {
  overflow-x: auto;
}

.OtherInput {
  display: none;
  width: 100%;
  box-sizing: border-box;
  margin-top: -3px;
  margin-bottom: 2px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.OtherInput:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 59, .15);
}

.OtherInput.Show {
  display: block;
  animation: rise .2s ease;
}

.LikertRow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  min-width: 520px;
}

.LikertCell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 6px;
  cursor: pointer;
  text-align: center;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.LikertCell:hover {
  border-color: var(--gold-soft);
}

.LikertCell.Checked {
  border-color: var(--gold);
  background: #fbf5e8;
}

.LikertCell input {
  accent-color: var(--gold);
}

.LikertCell .Lbl {
  font-size: .78rem;
  color: #4a463c;
}

.StmtBlock {
  margin-bottom: 24px;
  padding-bottom: 6px;
}

.StmtBlock .StmtText {
  font-weight: 500;
  color: #26241f;
  margin-bottom: 10px;
}

table.Fin {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: .9rem;
}

table.Fin caption {
  caption-side: top;
  font-weight: 700;
  color: var(--navy-deep);
  text-align: center;
  padding-bottom: 8px;
  font-size: .95rem;
}

table.Fin th,
table.Fin td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: center;
}

table.Fin th {
  background: #f0e9d8;
  color: var(--navy-deep);
}

table.Fin td:first-child {
  text-align: right;
  font-weight: 500;
  background: #fbf8f2;
}

.NoteBlock {
  background: #f4efe1;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: .92rem;
  color: #3a362c;
}

.NoteBlock b {
  color: var(--navy-deep);
}

.NavRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 10px;
}

button {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  border-radius: 10px;
  padding: 13px 26px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}

button:not(:disabled):active {
  transform: scale(.98);
}

.BtnPrimary {
  background: var(--navy-deep);
  color: #fff;
}

.BtnPrimary:not(:disabled):hover {
  box-shadow: 0 8px 18px rgba(14, 33, 53, .25);
}

.BtnPrimary:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.BtnGhost {
  background: transparent;
  color: var(--navy-deep);
  border: 1.5px solid var(--line);
}

.BtnGhost:not(:disabled):hover {
  border-color: var(--gold);
}

.BtnGhost:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.ErrorMsg {
  color: var(--danger);
  font-size: .85rem;
  margin-top: 4px;
  margin-bottom: 16px;
  display: none;
}

.ErrorMsg.Show {
  display: block;
}

.ConfigBar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: .82rem;
  color: #6b6455;
}

.ConfigBar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: .8rem;
}

.ConfigBar button {
  padding: 8px 14px;
  font-size: .8rem;
}

.ConfigStatus {
  font-size: .78rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: #eee;
}

.ConfigStatus.Ok {
  background: #e2efe4;
  color: var(--good);
}

.Thankyou {
  text-align: center;
  padding: 20px 0;
}

.Thankyou .BigCheck {
  font-size: 3rem;
  color: var(--good);
  margin-bottom: 10px;
}

.SubmitStatus {
  font-size: .85rem;
  margin-top: 10px;
  text-align: center;
  color: #7a7263;
}

.SubmitStatus.Err {
  color: var(--danger);
}

@media(max-width:600px) {
  .Card {
    padding: 24px 18px;
  }

  h1.StepTitle {
    font-size: 1.35rem;
  }

  .LikertRow {
    grid-template-columns: repeat(5, minmax(90px, 1fr));
  }
}
