/* Fonts: self-hosted, SIL Open Font Licence (see assets/fonts/OFL-LICENSE.txt) */
@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-tight-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-tight-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-tight-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --red: #ce1126;
  --ink: #0e0e10;
  --paper: #f4f4f5;
  --white: #fff;
  --muted: #62626a;
  --line: #d6d6d9;
  --line-ink: #33333a;
  --on-ink: #a9a9b0;

  --font: "Inter Tight", "Plex Arabic", -apple-system, "Segoe UI", Tahoma, sans-serif;
  --track-xl: -.035em;
  --track-l: -.02em;
  --lead-xl: .96;
  --lead-l: 1.08;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 144px;

  --frame: 1440px;
  --rail: clamp(0px, 2.5vw, 32px);
  --pad: clamp(16px, 2vw, 24px);
}

html[lang="ar"] { --track-xl: 0; --track-l: 0; --lead-xl: 1.22; --lead-l: 1.4; }

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.5; color: var(--ink); background: var(--paper); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; font: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.on-ink :focus-visible, .band-red :focus-visible { outline-color: currentColor; }

/* The frame: two hairlines down the page, content sits inside them */
.frame { max-width: calc(var(--frame) + 2 * var(--rail)); margin-inline: auto; padding-inline: var(--rail); }
.inner { padding-inline: var(--pad); }
.rails { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.rails::before { content: ""; display: block; height: 100%; max-width: var(--frame); margin-inline: auto; border-inline: 1px solid rgb(128 128 136 / .24); }
@media (max-width: 1500px) { .rails::before { margin-inline: var(--rail); } }

.arrow { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; transition: transform .18s ease; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
a:hover > .arrow { transform: translateX(6px); }
html[dir="rtl"] a:hover > .arrow { transform: scaleX(-1) translateX(6px); }

.skip { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; z-index: 50; }
.skip:focus { width: auto; height: auto; clip-path: none; top: 8px; inset-inline-start: 8px; background: var(--white); padding: 8px 16px; }

.cap { font-size: .875rem; line-height: 1.45; color: var(--muted); }
html[lang="ar"] .cap { line-height: 1.7; }
.txt-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.txt-link:hover { color: var(--red); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: .9375rem; font-weight: 500; line-height: 1.2; }
.brand-mark { display: grid; grid-template-rows: repeat(3, 4px); width: 20px; flex: none; outline: 1px solid var(--line); }
.brand-mark i:nth-child(1) { background: var(--red); }
.brand-mark i:nth-child(2) { background: var(--white); }
.brand-mark i:nth-child(3) { background: var(--ink); }
.site-nav ul { display: flex; align-items: center; gap: var(--s3); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); }

/* Masthead */
.masthead { padding-block: var(--s6) var(--s5); }
.display { font-size: clamp(2.875rem, 8.7vw, 8.25rem); font-weight: 500; line-height: var(--lead-xl); letter-spacing: var(--track-xl); }
html[lang="ar"] .display { font-size: clamp(2.5rem, 7.8vw, 7.25rem); font-weight: 600; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s6); }
.meta h2 { font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.meta p, .meta dd, .meta dt, .meta address, .meta li { font-size: .9375rem; line-height: 1.4; }
html[lang="ar"] .meta p, html[lang="ar"] .meta dd, html[lang="ar"] .meta dt, html[lang="ar"] .meta address, html[lang="ar"] .meta li { line-height: 1.7; }
.meta .lede { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; max-width: 19em; }
html[lang="ar"] .meta .lede { line-height: 1.6; }
.meta dd + dt { margin-top: 6px; }
.meta dt { color: var(--muted); }
.meta a:hover { color: var(--red); }

/* The flag: red carries the news, white and black are the main routes */
.flag a { display: block; font-size: clamp(1.75rem, 4.6vw, 4.25rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.1; }
html[lang="ar"] .flag a { font-weight: 600; line-height: 1.35; }
.flag .row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: clamp(80px, 10vw, 136px); padding-block: var(--s2); }
.flag .arrow { width: .8em; height: .8em; stroke-width: 1.25; }
.flag a:hover .arrow { transform: translateX(10px); }
html[dir="rtl"] .flag a:hover .arrow { transform: scaleX(-1) translateX(10px); }

/* News band. A still list by default; ticker.js adds .is-moving */
.ticker-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; padding-top: var(--s1); font-size: .9375rem; font-weight: 500; }
.ticker-toggle { min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }
.ticker-list { padding-block: var(--s1) var(--s3); font-size: clamp(1.75rem, 4.6vw, 4.25rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.1; }
html[lang="ar"] .ticker-list { font-weight: 600; line-height: 1.35; }
.ticker-list li + li { margin-top: var(--s1); }
.is-moving .ticker-view { max-width: none; padding-inline: 0; overflow: hidden; }
.is-moving .ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-time, 40s) linear infinite; }
.is-moving .ticker-list { display: flex; flex: none; padding-inline: 0; white-space: nowrap; }
.is-moving .ticker-list li { display: flex; align-items: center; margin: 0; }
.is-moving .ticker-list li::after { content: ""; width: .2em; height: .2em; margin-inline: .8em; background: currentColor; }
.ticker-view:hover .ticker-track, .is-paused .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(var(--ticker-shift)); } }

.band-red { background: var(--red); color: var(--white); }
.band-white { background: var(--white); color: var(--ink); }
.band-ink { background: var(--ink); color: var(--white); }

/* Sections: small label in the margin, content in the wide column */
.sec { display: grid; grid-template-columns: 3fr 9fr; gap: var(--s3); padding-block: var(--s7); }
.sec + .sec-rule { border-top: 1px solid var(--line); }
.sec-label { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.sec-label + .cap { margin-top: var(--s1); max-width: 16em; }
.sec-side .txt-link { display: inline-block; margin-top: var(--s2); font-size: .9375rem; }

/* Index rows */
.index { border-top: 1px solid var(--ink); }
.index li > a { display: grid; grid-template-columns: 56px 1.4fr 1fr 32px; gap: var(--s2); align-items: baseline; padding-block: 20px; border-bottom: 1px solid var(--line); transition: color .12s ease; }
.index li > a:hover { color: var(--red); }
.index .num { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.index .title { font-size: clamp(1.375rem, 2.5vw, 2rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.15; }
html[lang="ar"] .index .title { line-height: 1.5; font-weight: 500; }
.index .note { font-size: .9375rem; color: var(--muted); line-height: 1.35; }
.index a:hover .note { color: inherit; }
.index .closed { color: var(--red); }
.index .arrow { justify-self: end; align-self: center; width: 22px; height: 22px; }

/* Welcome */
.portrait { width: 100%; max-width: 220px; mix-blend-mode: multiply; filter: grayscale(1) contrast(1.05); margin-top: var(--s3); }
.lead { font-size: clamp(1.5rem, 2.8vw, 2.5rem); font-weight: 500; line-height: 1.16; letter-spacing: var(--track-l); max-width: 24em; }
html[lang="ar"] .lead { line-height: 1.6; }
.body-cols { columns: 2; column-gap: var(--s4); margin-top: var(--s5); max-width: 840px; }
.body-cols p + p { margin-top: var(--s2); }
.body-cols p { break-inside: avoid; }

/* People */
.people { border-top: 1px solid var(--ink); }
.person { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s2); align-items: baseline; padding-block: 20px; border-bottom: 1px solid var(--line); }
.person .name { font-size: clamp(1.375rem, 2.5vw, 2rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.15; }
html[lang="ar"] .person .name { line-height: 1.5; }

/* Statement */
.statement { padding-block: var(--s8); border-top: 1px solid var(--line); }
.statement blockquote { font-size: clamp(2rem, 5.6vw, 5.25rem); font-weight: 500; line-height: 1.02; letter-spacing: var(--track-xl); max-width: 17em; }
html[lang="ar"] .statement blockquote { font-weight: 600; line-height: 1.45; }

/* Inner page title */
.page-title { padding-block: var(--s6) var(--s5); border-bottom: 1px solid var(--ink); display: grid; grid-template-columns: 9fr 3fr; gap: var(--s3); align-items: end; }
.page-title .cap { font-size: .9375rem; }

/* Services */
.entry { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s3); padding-block: var(--s6); border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.entry-head { position: sticky; top: 96px; align-self: start; }
.entry-head .num { display: block; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: var(--s1); }
.entry-head h2 { font-size: clamp(1.75rem, 3.4vw, 3rem); font-weight: 500; line-height: var(--lead-l); letter-spacing: var(--track-l); max-width: 12em; }
.entry-head .flagged { display: block; margin-top: var(--s2); color: var(--red); font-weight: 500; font-size: .9375rem; }
.entry-head .get { display: inline-block; margin-top: var(--s2); font-size: .9375rem; }
.steps { counter-reset: step; max-width: 62ch; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 36px; padding-block: 6px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; color: var(--muted); font-size: .875rem; line-height: inherit; font-variant-numeric: tabular-nums; }
.entry-body > p { color: var(--muted); max-width: 62ch; }

details.case { border-top: 1px solid var(--line); }
details.case:first-of-type { border-top-color: var(--ink); }
details.case:last-of-type { border-bottom: 1px solid var(--line); }
details.case summary { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-block: 14px; font-size: 1.125rem; font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none; }
html[lang="ar"] details.case summary { line-height: 1.6; }
details.case summary::-webkit-details-marker { display: none; }
details.case summary::after { content: "+"; flex: none; font-size: 1.375rem; font-weight: 400; line-height: 1; }
details.case[open] summary::after { content: "\2212"; }
details.case summary:hover { color: var(--red); }
.case-body { padding-bottom: var(--s3); }
.case-body > p { color: var(--muted); margin-bottom: var(--s1); max-width: 62ch; }
.parties { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.parties h4 { font-size: .875rem; color: var(--muted); margin-bottom: 6px; }

/* Forms list */
.form-row { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--s3); align-items: center; padding-block: var(--s2); border-bottom: 1px solid var(--line); }
.form-row img { width: 96px; height: 128px; object-fit: cover; object-position: top; mix-blend-mode: multiply; filter: grayscale(1); }
.form-row .title { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.2; }
html[lang="ar"] .form-row .title { line-height: 1.5; }
a.form-row:hover { color: var(--red); }
.form-row .go { font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.form-row .closed { color: var(--red); font-size: .9375rem; }

/* Contact */
.contact { padding-bottom: var(--s7); }
.details > div { display: grid; grid-template-columns: 3fr 9fr; gap: var(--s3); align-items: baseline; padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.details h2 { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.details .big { display: block; font-size: clamp(1.625rem, 4vw, 3.5rem); font-weight: 500; letter-spacing: var(--track-l); line-height: 1.15; overflow-wrap: anywhere; }
html[lang="ar"] .details .big { letter-spacing: 0; text-align: right; }
.details a.big:hover { color: var(--red); }
.details dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--s3); }
.details dt { color: var(--muted); }
.details dl, .details address { font-size: clamp(1.0625rem, 1.7vw, 1.5rem); line-height: 1.35; }
html[lang="ar"] .details dl, html[lang="ar"] .details address { line-height: 1.7; }
.map { display: block; width: 100%; height: clamp(320px, 42vw, 560px); border: 0; filter: grayscale(1) contrast(1.02); }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); padding-block: var(--s6); font-size: .9375rem; line-height: 1.45; }
html[lang="ar"] .footer-grid { line-height: 1.75; }
.footer-grid h3 { color: var(--on-ink); margin-bottom: 4px; }
.footer-grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-base { border-top: 1px solid var(--line-ink); padding-block: var(--s2); font-size: .8125rem; color: var(--on-ink); }

.notfound { min-height: 70vh; display: grid; align-content: center; gap: var(--s3); }

@media (max-width: 1023px) {
  .meta, .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .sec { grid-template-columns: 1fr; gap: var(--s4); padding-block: var(--s6); }
  .portrait { max-width: 160px; }
  .entry { grid-template-columns: 1fr; gap: var(--s3); padding-block: var(--s5); }
  .entry-head { position: static; }
  .page-title { grid-template-columns: 1fr; gap: var(--s2); }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 16px; }
  body { font-size: 1rem; }
  .rails { display: none; }
  .site-header { position: static; }
  .header-row { flex-direction: column; align-items: stretch; gap: 0; padding-top: 12px; }
  .site-nav ul { justify-content: space-between; gap: 4px; flex-wrap: wrap; }
  .site-nav a { font-size: .875rem; }
  html[lang="ar"] .site-nav a { font-size: .8125rem; }
  .brand { min-height: 44px; }
  .meta a, .txt-link { display: inline-flex; align-items: center; min-height: 44px; }
  .meta h2 { margin-bottom: 0; }
  .details > div { grid-template-columns: 1fr; gap: 4px; padding-block: var(--s2); }
  .details h2 { font-size: .875rem; color: var(--muted); }
  .details a.big { padding-block: 6px; }
  .details .big { font-size: min(1.625rem, 6.4vw); }
  .masthead { padding-block: var(--s5) var(--s4); }
  .meta { gap: var(--s3) var(--s2); margin-top: var(--s5); }
  .meta > :first-child { grid-column: 1 / -1; }
  .index li > a { grid-template-columns: 32px 1fr 22px; gap: 4px var(--s1); padding-block: var(--s2); }
  .index .note { grid-column: 2; grid-row: 2; }
  .index .arrow { grid-column: 3; grid-row: 1; }
  .body-cols { columns: 1; margin-top: var(--s3); }
  .person { grid-template-columns: 1fr; gap: 4px; }
  .statement { padding-block: var(--s7); }
  .parties { grid-template-columns: 1fr; gap: var(--s3); }
  .form-row { grid-template-columns: 64px 1fr; gap: var(--s2); }
  .form-row img { width: 64px; height: 88px; }
  .form-row .go, .form-row .closed { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; }
}

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