/* Arabic letters only: PanoramaNaskh has no Latin letters and turns digits into Arabic-Indic, so those stay in Oman Typeface */
@font-face { font-family: "PN Arabic"; src: url("fonts/PanoramaNaskhMobile-Regular.otf") format("opentype"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-065F, U+066A-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Oman Typeface"; src: url("fonts/OmanTypeface-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Oman Typeface"; src: url("fonts/OmanTypeface-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Oman Typeface"; src: url("fonts/OmanTypeface-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --maroon:#7B1217; --maroon-dark:#5C0D11; --ink:#7B1217; --grey:#8E6163; --line:#E3D2D3; --tint:#F8F3F3; --paper:#FFFFFF; --error:#B3261E; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Oman Typeface", "Segoe UI", Tahoma, Arial, sans-serif; font-size: 17px; line-height: 1.7; }
html[lang="en"] body { line-height: 1.6; }
/* Arabic headings only are set in PanoramaNaskh; everything else is Oman Typeface */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] legend { font-family: "PN Arabic", "Oman Typeface", Tahoma, sans-serif; font-weight: 400; }
html[lang="ar"] h1 { font-size: clamp(40px, 6vw, 66px); line-height: 1.4; }
html[lang="ar"] h2 { font-size: clamp(32px, 4vw, 44px); }
html[lang="ar"] h3, html[lang="ar"] legend { font-size: 26px; }
html[lang="ar"] #done h3 { font-size: 32px; }
a { color: var(--maroon); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

header.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
header.top img { height: 58px; display: block; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-block; background: var(--maroon); color: #fff; border: 2px solid var(--maroon); padding: 10px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover, .btn:focus-visible { background: var(--maroon-dark); border-color: var(--maroon-dark); }
.btn.ghost { background: transparent; color: var(--maroon); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--tint); }
.btn.small { padding: 6px 14px; font-size: 15px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.hero { padding: 56px 0 44px; }
.hero .grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--maroon); font-weight: 700; letter-spacing: .04em; margin: 0 0 10px; }
h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.2; margin: 0 0 10px; }
.hero .sub { font-size: clamp(19px, 2.4vw, 25px); color: var(--maroon); font-weight: 500; margin: 0 0 16px; }
.hero p.lead { color: var(--grey); margin: 0 0 26px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .logo-big { width: 100%; max-width: 380px; justify-self: center; }

.facts { background: var(--maroon); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 22px 16px; border-inline-start: 1px solid rgba(255,255,255,.25); }
.fact:first-child { border-inline-start: 0; }
.fact b { display: block; font-size: 20px; }
.fact span { font-size: 15px; opacity: .9; }

section.block { padding: 52px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
#done, form fieldset { scroll-margin-top: 96px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.sec-head .num { color: var(--maroon); font-weight: 700; font-size: 20px; direction: ltr; }
h2 { font-size: clamp(24px, 3vw, 32px); margin: 0; line-height: 1.3; }
h3 { font-size: 19px; margin: 0 0 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean li { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; }
ul.clean li b { color: var(--maroon); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips span { border: 1px solid var(--maroon); color: var(--maroon); padding: 4px 12px; font-size: 15px; }
.crit { display: grid; gap: 12px; }
.crit .row { display: grid; grid-template-columns: 1fr 3.2em; gap: 10px; align-items: center; }
.crit .bar { height: 8px; background: var(--tint); margin-top: 4px; }
.crit .bar i { display: block; height: 100%; background: var(--maroon); }
.crit .pct { font-weight: 700; color: var(--maroon); direction: ltr; text-align: end; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li { counter-increment: s; padding: 10px 0 10px; padding-inline-start: 44px; position: relative; border-bottom: 1px solid var(--line); }
ol.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 10px; width: 30px; height: 30px; background: var(--maroon); color: #fff; font-weight: 700; display: grid; place-items: center; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); padding: 18px; }
.card b { display: block; color: var(--maroon); font-size: 18px; margin-bottom: 4px; }
.card span { font-size: 15px; color: var(--grey); }
.note { background: var(--tint); border-inline-start: 4px solid var(--maroon); padding: 12px 16px; font-size: 15.5px; margin-top: 18px; }
table.dates { width: 100%; border-collapse: collapse; }
table.dates td { border-bottom: 1px solid var(--line); padding: 11px 0; vertical-align: top; }
table.dates td:first-child { width: 13em; color: var(--maroon); font-weight: 700; }

form fieldset { border: 1px solid var(--line); margin: 0 0 22px; padding: 22px; min-width: 0; }
form legend { font-weight: 700; font-size: 19px; color: var(--maroon); padding: 0 8px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f label, .f .lab { font-weight: 500; font-size: 15.5px; }
.req::after { content: " *"; color: var(--error); }
.f input[type=text], .f input[type=email], .f input[type=tel], .f input[type=number], .f select, .f textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #BC9A9C; background: #fff; color: var(--ink); width: 100%; border-radius: 0; }
.f textarea { min-height: 240px; resize: vertical; }
.f .hint { font-size: 14px; color: var(--grey); }
.f .err { font-size: 14px; color: var(--error); display: none; }
.f.invalid .err { display: block; }
.f.invalid input, .f.invalid select, .f.invalid textarea { border-color: var(--error); border-width: 2px; }
.inline { display: flex; gap: 10px; }
.count { font-size: 14px; color: var(--grey); direction: ltr; text-align: end; }
.count.over { color: var(--error); font-weight: 700; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check:last-of-type { border-bottom: 0; }
.check input { width: 20px; height: 20px; margin-top: 5px; accent-color: var(--maroon); }
.check small { display: block; color: var(--grey); font-size: 14px; }
.check.invalid label { color: var(--error); }
ol.terms { margin: 0 0 14px; padding-inline-start: 22px; font-size: 15.5px; }
ol.terms li { margin-bottom: 5px; }
.form-error { display: none; background: #FCEEEE; border: 2px solid var(--error); color: var(--error); padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.form-error.show { display: block; }
.submit-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

#done { display: none; border: 2px solid var(--maroon); padding: 28px; }
#done.show { display: block; }
#done h3 { color: var(--maroon); font-size: 24px; }
#done .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.subject { background: var(--tint); padding: 10px 14px; font-size: 15px; direction: ltr; text-align: left; overflow-wrap: anywhere; }

footer { background: var(--ink); color: #fff; padding: 40px 0; }
footer .two { align-items: start; }
footer a { color: #fff; }
footer img { height: 96px; }
footer small { opacity: .75; }

#summary { display: none; }
@media (max-width: 820px) {
  .hero .grid, .two { grid-template-columns: 1fr; }
  .hero .logo-big { max-width: 260px; order: -1; justify-self: start; }
  .facts .wrap { grid-template-columns: 1fr 1fr; padding: 0; }
  .fact { border-inline-start: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .cards { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr; }
  ul.clean li { grid-template-columns: 1fr; gap: 0; }
  table.dates td:first-child { width: 8.5em; }
  header.top img { height: 46px; }
}
@media print {
  body > *:not(#summary) { display: none !important; }
  #summary { display: block; font-family: "Oman Typeface", Arial, sans-serif; font-size: 11pt; line-height: 1.5; color: #7B1217; }
  #summary h1 { font-size: 16pt; margin: 0 0 2mm; }
  #summary h2 { font-size: 12pt; color: #7B1217; border-bottom: 0.5mm solid #7B1217; margin: 6mm 0 2mm; padding-bottom: 1mm; }
  #summary table { width: 100%; border-collapse: collapse; }
  #summary td { border: 0.2mm solid #BC9A9C; padding: 1.5mm 2.5mm; vertical-align: top; }
  #summary td:first-child { width: 38%; font-weight: bold; background: #F2E7E8; }
  #summary .desc { white-space: pre-wrap; border: 0.2mm solid #BC9A9C; padding: 3mm; }
  #summary img { height: 22mm; }
  #summary .sig { margin-top: 8mm; display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
  #summary .sig div { border-top: 0.3mm solid #7B1217; padding-top: 1.5mm; }
  @page { size: A4; margin: 15mm; }
}

/* ---------- Added for the online submission flow and the second page ---------- */
/* Everything above this line is the original style block of index.html, unchanged except for the font paths. */
/* The scripts show and hide elements with the hidden attribute, which also works if this file fails to load. */
[hidden] { display: none !important; }
/* Spam-trap field: only its wrapper is moved off-screen (upwards, so it adds no scrolling in either direction).
   The same values are repeated inline on the wrapper, again in case this file fails to load. */
.hp { position: absolute; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f input[type=file] { font: inherit; font-size: 15.5px; padding: 8px 10px; border: 1px solid #BC9A9C; background: #fff; color: var(--ink); width: 100%; border-radius: 0; }
.f.invalid input[type=file] { border-color: var(--error); border-width: 2px; }
.f input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-inline-end: 12px; padding: 5px 14px; border: 2px solid var(--maroon); background: transparent; color: var(--maroon); cursor: pointer; }
.fine { font-size: 14px; color: var(--grey); margin: 12px 0 0; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.send-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.send-progress .bar { flex: 1; height: 8px; background: var(--tint); }
.send-progress .bar i { display: block; width: 0; height: 100%; background: var(--maroon); }
.send-progress .pct { min-width: 3.2em; font-weight: 700; color: var(--maroon); direction: ltr; text-align: end; }
#done .ref { font-weight: 700; }

/* Second page */
.wrap.narrow { max-width: 780px; }
.judge { padding: 44px 0 52px; }
.judge h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
html[lang="ar"] .judge h1 { font-size: clamp(34px, 5vw, 50px); }
.judge .lead { color: var(--grey); margin: 0 0 26px; }
.judge .box { border: 1px solid var(--line); margin: 0 0 22px; padding: 22px; min-width: 0; }
.judge #decisionField label { font-size: 17px; }
.judge #acceptOnly { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.judge #acceptOnly .f { max-width: 22em; margin-bottom: 8px; }
.judge .f textarea { min-height: 130px; }
.judge .fine { margin: 0 0 18px; }
.judge #done { margin-bottom: 22px; }
.judge #done h2 { color: var(--maroon); font-size: 24px; margin: 0 0 8px; }
html[lang="ar"] .judge #done h2 { font-size: 26px; }
.judge #done p:last-child { margin-bottom: 0; }
/* The second page has no #summary, so the print rule above would leave its sheet blank: print its main part instead. */
@media print {
  body > main.judge:not(#summary) { display: block !important; padding: 0; }
}
