/* Layout concept: a departure board for nurses. Jobs are tickets with a country stub,
   countries are passport stamps, the one loud colour is the "visa" stamp. */
:root {
  --paper: #F4F7F6;      /* page ground, cool white with a green bias */
  --surface: #FFFFFF;
  --ink: #14233A;        /* navy text */
  --muted: #56666E;
  --line: #D8E1DE;
  --teal: #0E6B63;       /* scrubs green: brand + links */
  --teal-soft: #E1EFEC;
  --stamp: #B4234E;      /* visa stamp red */
  --stamp-soft: #FBE9EF;
  --ok: #2F6B2A;
  --gold: #8A5A00;
  --gold-soft: #FFF3D9;
  --shadow: 0 1px 0 rgba(20, 35, 58, .04), 0 6px 18px -10px rgba(20, 35, 58, .25);

  --f-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: .86rem; --step-0: 1rem; --step-1: 1.2rem; --step-2: 1.5rem; --step-3: clamp(1.7rem, 3.2vw, 2.25rem);
  --step-4: clamp(2.1rem, 5.4vw, 3.6rem);
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1719; --surface: #152125; --ink: #E6EEEC; --muted: #98AAAD; --line: #26383C;
    --teal: #4FC3B3; --teal-soft: #173431; --stamp: #F27C9F; --stamp-soft: #3A1823;
    --ok: #8BD07F; --gold: #F2C567; --gold-soft: #3A2E12;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 20px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
html[lang="ar"] { --f-display: "IBM Plex Sans Arabic", system-ui, sans-serif; --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--f-body); }
html[lang="ar"] body { line-height: 1.8; }
img { max-width: 100%; }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, .h3 { font-family: var(--f-display); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
html[lang="ar"] :is(h1, h2, h3, .h3) { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3, .h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1em; }
.mono { font-family: var(--f-mono); font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.small { font-size: var(--step--1); }
.muted { color: var(--muted); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 40em; }
.arrow { display: inline-block; transition: transform .15s; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; }

.skip { position: absolute; inset-inline-start: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { inset-inline-start: .5rem; }
.demo-bar { background: var(--gold-soft); color: var(--gold); text-align: center; font: 500 var(--step--1) var(--f-mono); padding: .35rem 1rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.brand-name { font: 600 1.12rem/1 var(--f-display); margin: 0; }
.brand-name b { color: var(--teal); font-weight: 800; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.nav { display: flex; align-items: center; gap: .25rem 1.1rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding-block: .35rem; }
.nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); }
.nav .nav-cta { background: var(--teal); color: var(--paper); padding: .45rem .9rem; border-radius: 999px; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langs a { font: 500 var(--step--1)/1 var(--f-mono); padding: .45rem .6rem; }
.langs a[aria-current="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 859px) {
  .menu { position: static; }
  .menu[open] .nav { position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem clamp(1rem, 4vw, 2rem) 1rem; box-shadow: var(--shadow); }
  .menu[open] .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .menu[open] .nav .nav-cta { text-align: center; margin-top: .8rem; border: 0; padding: .7rem; }
  .menu[open] .langs { align-self: flex-start; margin-top: .8rem; }
  .menu[open] .langs a { border: 0; padding: .5rem .8rem; }
}
@media (min-width: 860px) {
  .menu summary { display: none; }
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--teal); color: var(--paper);
  font: 600 var(--step-0)/1.2 var(--f-body); border: 0; border-radius: 999px; padding: .8rem 1.4rem; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }
.btn-ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn-wide { width: 100%; }
.linkish { background: none; border: 0; color: var(--teal); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; justify-self: start; }
.field { display: grid; gap: .35rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-size: var(--step--1); font-weight: 600; color: var(--muted); padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }
.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500; cursor: pointer; }
.check input, .inline-radios input, .role-pills input { width: auto; accent-color: var(--teal); margin-top: .3rem; }
.req { color: var(--stamp); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--teal-soft), var(--paper)); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; gap: 1.5rem 3rem; padding-block: clamp(2rem, 6vw, 4.5rem); align-items: end; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.15fr 1fr; } .stats { grid-column: 1; } .search { grid-row: 1 / span 2; grid-column: 2; align-self: center; } }
.kicker { font: 500 var(--step--1) var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
html[lang="ar"] .kicker { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-weight: 600; }
.hero h1 { max-width: 14em; }
.search { display: grid; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 3vw, 1.5rem); box-shadow: var(--shadow); }
.stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: var(--step--1); }
.stats dd { margin: 0; font-size: var(--step-2); color: var(--ink); }

/* Country stamps */
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .8rem; }
@media (min-width: 1000px) { .stamps { grid-template-columns: repeat(5, 1fr); } }
.stamp { display: grid; gap: .15rem; padding: 1rem 1.1rem; border: 1.5px dashed color-mix(in srgb, var(--teal) 45%, var(--line)); border-radius: 14px;
  background: var(--surface); color: var(--ink); text-decoration: none; height: 100%; transition: transform .15s, border-color .15s; }
.stamp:hover { transform: translateY(-2px); border-color: var(--teal); }
.stamp-code { font-size: var(--step-2); color: var(--teal); line-height: 1; }
.stamp-code.big { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.stamp-name { font-weight: 600; font-size: var(--step-1); }
.stamp-count { color: var(--muted); }
.stamp-reg { font-size: .74rem; color: var(--muted); margin-top: .4rem; text-transform: uppercase; }

/* Job tickets */
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ticket { position: relative; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.ticket:hover { border-color: color-mix(in srgb, var(--teal) 50%, var(--line)); box-shadow: var(--shadow); }
.ticket.is-featured { border-color: var(--gold); }
.stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; background: var(--teal-soft);
  border-inline-end: 2px dashed var(--line); padding: .8rem .4rem; text-align: center; }
.stub-code { font: 500 1.35rem/1 var(--f-mono); color: var(--teal); }
.stub-reg { font: 500 .62rem/1.1 var(--f-mono); color: var(--muted); text-transform: uppercase; word-break: break-word; }
.ticket-body { padding: .85rem 1rem; min-width: 0; }
.ticket-title { font: 600 var(--step-1)/1.3 var(--f-body); margin: 0 0 .2rem; unicode-bidi: plaintext; }
.ticket-title a { color: var(--ink); text-decoration: none; }
.ticket-title a::after { content: ""; position: absolute; inset: 0; }
.ticket-title a:hover { color: var(--teal); }
.ticket-meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; color: var(--muted); margin: 0 0 .45rem; font-size: var(--step--1); }
.ticket-meta .co { color: var(--ink); font-weight: 500; }
.ticket-date { font-size: .75rem; color: var(--muted); padding: .95rem 1rem 0 0; white-space: nowrap; }
[dir="rtl"] .ticket-date { padding: .95rem 0 0 1rem; }
@media (max-width: 560px) {
  .ticket { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .ticket-date { grid-column: 2; padding: 0 1rem .8rem; }
  [dir="rtl"] .ticket-date { padding: 0 1rem .8rem; }
  .stub-code { font-size: 1.05rem; }
}
.tickets.compact .ticket { grid-template-columns: 3.4rem minmax(0, 1fr); }
.tickets.compact .ticket-date { display: none; }
.tickets.compact .ticket-title { font-size: var(--step-0); }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.chip { font-size: .76rem; font-weight: 600; padding: .18rem .55rem; border-radius: 6px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.chip-visa { color: var(--stamp); background: var(--stamp-soft); border: 1.5px solid var(--stamp); text-transform: uppercase; letter-spacing: .05em;
  font-family: var(--f-mono); transform: rotate(-1.5deg); }
html[lang="ar"] .chip-visa { font-family: var(--f-body); letter-spacing: 0; }
.chip-ok { color: var(--ok); }
.chip-feat { color: var(--gold); background: var(--gold-soft); border-color: var(--gold); }
.chip-pay { font-family: var(--f-mono); color: var(--ink); }

/* Panels on home */
.split { display: grid; gap: 1rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1.3fr 1fr; } }
.panel { border-radius: 16px; padding: clamp(1.25rem, 4vw, 2rem); min-width: 0; }
.panel-guides { background: var(--surface); border: 1px solid var(--line); }
.panel-safety { background: var(--stamp-soft); border: 1.5px solid var(--stamp); }
.panel-safety h2 { color: var(--stamp); }
.warn-mark { color: var(--stamp); font-size: var(--step-1); margin-bottom: .6rem; }
.guide-links { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0 1.5rem; }
.guide-links a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.guide-links a .mono { color: var(--muted); font-size: .76rem; align-self: center; }
.guide-links a:hover { color: var(--teal); }
.employer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; background: var(--ink); color: var(--paper);
  border-radius: 16px; padding: clamp(1.25rem, 4vw, 2.25rem); }
.employer h2 { margin-bottom: .3rem; }
.employer p { margin: 0; opacity: .85; max-width: 38em; }
.employer .btn { background: var(--paper); color: var(--ink); }

/* Page head + jobs layout */
.page-head { padding-block: clamp(1.75rem, 5vw, 3rem) 1rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--teal-soft), var(--paper)); }
.page-head h1 { font-size: var(--step-3); }
.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); }
.jobs-layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 900px) { .jobs-layout { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; } .filters { position: sticky; top: 5rem; } }
.filters { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
.role-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.role-pills label { cursor: pointer; }
.role-pills input { position: absolute; opacity: 0; pointer-events: none; }
.role-pills span { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--step--1); font-weight: 500; color: var(--ink); }
.role-pills input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.role-pills input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.count { color: var(--muted); font-size: var(--step--1); margin-bottom: .8rem; }
.empty { padding: 2rem; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); }
#more { margin-top: 1.2rem; }

/* Job page */
.job { padding-block: 1.5rem 3rem; }
.job-grid { display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 900px) { .job-grid { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } .job-side { position: sticky; top: 5rem; } }
.job-head h1 { font-size: var(--step-3); margin: .6rem 0 .3rem; }
.job-co { font-size: var(--step-1); font-weight: 500; }
.facts { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 1.2rem 0 2rem; }
.facts div { flex: 1 1 10rem; padding: .7rem .9rem; min-width: 0; box-shadow: 1px 1px 0 var(--line); }
.facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
html[lang="ar"] .facts dt { text-transform: none; letter-spacing: 0; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.job-main h2 { font-size: var(--step-2); }
.job-desc { max-width: 42em; overflow-wrap: anywhere; }
.job-side { display: grid; gap: 1rem; min-width: 0; }
.apply-box, .side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
.apply-box p { margin: .7rem 0 0; }
.side-warn { background: var(--stamp-soft); border-color: var(--stamp); }
.side-warn h2 { color: var(--stamp); }
.side-box p:last-child { margin-bottom: 0; }

/* Guides */
.guide-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.guide-card { display: grid; gap: .35rem; height: 100%; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.guide-card:hover { border-color: var(--teal); }
.guide-card-title { font: 800 var(--step-2)/1.2 var(--f-display); }
.guide-card-desc { color: var(--muted); font-size: var(--step--1); }
.guide { padding-block: 1.5rem 3rem; }
.guide-head { display: flex; gap: 1.2rem 2rem; align-items: flex-start; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.guide-head > div { flex: 1 1 20rem; min-width: 0; }
.guide-head .stamp-code { border: 2px dashed var(--teal); border-radius: 14px; padding: .6rem .8rem; transform: rotate(-3deg); }
.guide-head h1 { font-size: var(--step-3); }
.guide-grid { display: grid; gap: 2rem 3rem; }
@media (min-width: 960px) { .guide-grid { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } .guide-side { position: sticky; top: 5rem; } }
.guide-side { display: grid; gap: 1rem; min-width: 0; }

.prose { max-width: 42rem; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ol, .prose ul { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose ol { counter-reset: s; list-style: none; padding-inline-start: 0; }
.prose ol > li { counter-increment: s; position: relative; padding-inline-start: 2.6rem; margin-bottom: .9rem; }
.prose ol > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: .05rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--teal-soft); color: var(--teal); font: 500 .85rem var(--f-mono); }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--step--1); display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: start; vertical-align: top; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--stamp-soft); border-inline-start: 4px solid var(--stamp); border-radius: 0 10px 10px 0; }
[dir="rtl"] .prose blockquote { border-radius: 10px 0 0 10px; }
.prose blockquote p:last-child { margin: 0; }
.prose-page { margin-inline: auto; }
.prose-page h1 { font-size: var(--step-3); }
.note { margin-top: 2rem; padding: 1rem 1.2rem; background: var(--gold-soft); color: var(--ink); border-radius: 10px; font-size: var(--step--1); }

/* Employer form */
.ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.ticks li::before { content: "✓"; color: var(--teal); font-weight: 700; margin-inline-end: .45rem; }
.post-form { display: grid; gap: 1.4rem; max-width: 46rem; }
.post-form > fieldset { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 1.2rem; margin: 0; min-width: 0; }
.grid2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .span2 { grid-column: 1 / -1; } }
.inline-radios { display: flex; gap: 1.2rem; padding-top: .4rem; }
.inline-radios label { display: flex; gap: .4rem; align-items: center; font-weight: 500; color: var(--ink); font-size: var(--step-0); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: .9rem 1.1rem; border-radius: 10px; font-weight: 500; }
.form-msg.ok { background: var(--teal-soft); color: var(--teal); }
.form-msg.err { background: var(--stamp-soft); color: var(--stamp); }
.post-form .btn { justify-self: start; }
.is-invalid { border-color: var(--stamp) !important; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 2rem; }
.foot-in { display: grid; gap: 2rem; padding-block: 2.5rem; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-about p { color: var(--muted); max-width: 30em; }
.foot-about .brand-name { color: var(--ink); margin-bottom: .8rem; }
.foot-h { font-weight: 600; margin-bottom: .5rem; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: var(--step--1); color: var(--muted); }
.foot-list a { color: var(--muted); text-decoration: none; }
.foot-list a:hover { color: var(--teal); text-decoration: underline; }

.notfound { display: grid; gap: 1.5rem; max-width: 40rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.more-filters summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::after { content: "+"; font: 500 1.2rem var(--f-mono); color: var(--teal); }
.more-filters[open] summary::after { content: "–"; }
.more-filters-in { display: grid; gap: 1rem; padding-top: 1rem; }
@media (min-width: 900px) { .more-filters summary { display: none; } .more-filters-in { padding-top: 0; } }
