/* مكتب الوثيق: الموقع كله بيتقرا كأنه وثيقة قانونية. غلاف، تمهيد، مواد مرقّمة عناوينها بالهامش، وتوقيع بالآخر.
   خط العرض رقعة، خط عرائض المحاكم العربية. الخطوط كلها محلية، وما في أي ملف من موقع تاني. */

@font-face { font-family: "Aref Ruqaa"; font-weight: 700; font-display: swap; src: url("../fonts/aref-ruqaa-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Aref Ruqaa"; font-weight: 700; font-display: swap; src: url("../fonts/aref-ruqaa-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 400 700; font-display: swap; src: url("../fonts/noto-naskh-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 400 700; font-display: swap; src: url("../fonts/noto-naskh-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alyamama"; font-weight: 300 900; font-display: swap; src: url("../fonts/alyamama-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Alyamama"; font-weight: 300 900; font-display: swap; src: url("../fonts/alyamama-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f3eeea;
  --sheet: #fbf8f5;
  --ink: #231619;
  --ink-soft: #66575a;
  --anabi: #7a1530;
  --anabi-deep: #5c0f24;
  --on-anabi: #f6ece8;
  --on-anabi-soft: #d9bfc0;
  --rule: #d6cbc6;
  --rule-dark: #4a3a3d;
  --display: "Aref Ruqaa", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --body: "Noto Naskh Arabic", "Traditional Arabic", "Times New Roman", serif;
  --ui: "Alyamama", "Segoe UI", Tahoma, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --header: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.95; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.site { overflow-x: clip; }
.wrap { max-width: 1180px; margin-inline: auto; padding-left: calc(var(--gutter-l) + 12px); padding-right: calc(var(--gutter-r) + 12px); }
h1, h2, h3, p, ul, ol, dl { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--anabi); outline-offset: 3px; }
.band-dark :focus-visible, .cover :focus-visible, .closing :focus-visible, .foot :focus-visible { outline-color: var(--on-anabi); }
[id] { scroll-margin-top: calc(var(--header) + 20px); }
.skip { position: absolute; top: -100px; right: 16px; z-index: 50; padding: 10px 16px; background: var(--anabi); color: var(--on-anabi); font-family: var(--ui); }
.skip:focus { top: 12px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header); }
.brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--anabi); line-height: 1.2; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 26px; font-family: var(--ui); font-size: .95rem; }
.nav-link { text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; }
.nav-link:hover, .nav-link[aria-current="page"] { border-bottom-color: var(--anabi); color: var(--anabi); }
.menu { display: none; position: relative; }
.menu summary { display: flex; align-items: center; min-height: 42px; padding: 6px 16px; border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--sheet); border-color: var(--anabi); color: var(--anabi); }
.menu-panel { position: absolute; top: calc(100% + 12px); left: 0; display: grid; width: min(290px, calc(100vw - 32px)); padding: 8px; background: var(--sheet); border: 1px solid var(--rule); box-shadow: 0 14px 30px rgba(35, 22, 25, .14); }
.menu-panel a { padding: 12px 14px; text-decoration: none; border-radius: 2px; }
.menu-panel a:hover { background: var(--paper); }
.menu-panel a[aria-current="page"] { color: var(--anabi); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 24px; font-family: var(--ui); font-size: 1rem; font-weight: 500; text-decoration: none; text-align: center; border: 1px solid transparent; border-radius: 2px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn-solid { background: var(--anabi); color: var(--on-anabi); }
.btn-solid:hover { background: var(--anabi-deep); }
.btn-light { background: var(--on-anabi); color: var(--anabi-deep); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: var(--on-anabi-soft); color: var(--on-anabi); }
.btn-ghost:hover { background: var(--on-anabi); color: var(--anabi-deep); }
.btn-line { border-color: var(--anabi); color: var(--anabi); background: transparent; }
.btn-line:hover { background: var(--anabi); color: var(--on-anabi); }
.nav-cta { min-height: 42px; padding-inline: 18px; font-size: .92rem; }

/* Cover */
.cover { position: relative; background: var(--anabi); color: var(--on-anabi); }
.cover-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; padding-block: 22px 16px; border-bottom: 1px solid rgba(246, 236, 232, .28); font-family: var(--ui); font-size: .9rem; color: var(--on-anabi-soft); }
.cover h1 { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 10vw, 8.4rem); line-height: 1.62; padding-block: clamp(36px, 6vw, 72px) clamp(20px, 3vw, 36px); text-wrap: balance; }
.cover h1 span { display: block; }
.cover h1 span + span { color: var(--on-anabi-soft); }
.cover-foot { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 32px; padding-bottom: clamp(72px, 9vw, 112px); }
.lede { font-size: 1.28rem; line-height: 1.85; max-width: 42ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cover-inner h1 { font-size: clamp(2.4rem, 6.4vw, 5.2rem); line-height: 1.55; padding-block: clamp(28px, 5vw, 56px) 12px; max-width: 18ch; }
.cover-inner .lede { padding-bottom: clamp(36px, 5vw, 60px); color: var(--on-anabi-soft); }
.seal { position: absolute; left: max(var(--gutter-l), calc((100% - 1180px) / 2 + 28px)); bottom: -72px; width: clamp(148px, 19vw, 216px); transform: rotate(-11deg); filter: drop-shadow(0 8px 14px rgba(35, 22, 25, .28)); z-index: 2; }
.seal svg { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .seal { animation: press .55s cubic-bezier(.2, .9, .3, 1.1); }
  @keyframes press { from { transform: rotate(-3deg) scale(1.3); } to { transform: rotate(-11deg) scale(1); } }
}

/* Articles (the document's sections) */
.article { display: grid; grid-template-columns: minmax(150px, 228px) minmax(0, 1fr); gap: 28px clamp(32px, 6vw, 80px); padding-block: clamp(56px, 8vw, 96px); }
.article + .article { border-top: 1px solid var(--rule); }
.margin { position: sticky; top: calc(var(--header) + 28px); align-self: start; display: grid; gap: 2px; }
.margin .no { display: block; font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.35; color: var(--anabi); }
.margin .no-mark { font-size: 4.2rem; line-height: 1.1; }
.margin .name { display: block; font-family: var(--ui); font-size: .95rem; color: var(--ink-soft); }
.margin-link { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.margin-link:hover { color: var(--anabi); }
.band-dark .margin .no { color: var(--on-anabi); }
.band-dark .margin .name { color: var(--on-anabi-soft); }
.lead-line { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.5; text-wrap: balance; }
.prose { max-width: 62ch; margin-top: 20px; }
.stack > * + * { margin-top: 1em; }
.more { display: inline-block; margin-top: 24px; font-family: var(--ui); font-size: .98rem; font-weight: 500; color: var(--anabi); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more::after { content: " ←"; }
.more:hover { color: var(--anabi-deep); }
.more-light { color: var(--on-anabi); }
.more-light:hover { color: #fff; }
.actions-plain { margin-top: 28px; }

/* Preamble */
.preamble .lead-line { padding-top: 56px; }
.signed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 24px; font-family: var(--ui); font-size: .95rem; color: var(--ink-soft); }
.signed b { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--anabi); }
.signed .more { margin-top: 0; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; margin-top: 32px; padding-top: 18px; border-top: 2px solid var(--anabi); font-family: var(--ui); }
.facts dt { font-size: .85rem; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-size: 1rem; font-weight: 500; line-height: 1.6; }

/* Clauses */
.clauses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 64px); }
.clauses li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 12px; padding-block: 22px; border-bottom: 1px solid var(--rule); }
.clauses .mark { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1.3; color: var(--anabi); }
.clauses h3 { font-family: var(--ui); font-size: 1.14rem; font-weight: 700; line-height: 1.6; }
.clauses h3 a { text-decoration: none; }
.clauses h3 a:hover { color: var(--anabi); }
.clauses p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps .ord { display: block; font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--anabi); line-height: 1.5; padding-bottom: 8px; border-bottom: 2px solid var(--anabi); margin-bottom: 12px; }
.steps h3 { font-family: var(--ui); font-size: 1.08rem; font-weight: 700; line-height: 1.6; }
.steps p { color: var(--ink-soft); font-size: 1rem; line-height: 1.85; }

/* Practice areas page */
.area-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.5; color: var(--ink); }
.prose + .list-label, .list-label { margin-top: 24px; font-family: var(--ui); font-size: .88rem; color: var(--ink-soft); }
.ticks { display: grid; gap: 8px; margin-top: 8px; max-width: 62ch; }
.ticks li { position: relative; padding-inline-start: 26px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .8em; width: 12px; height: 2px; background: var(--anabi); }

/* Confidentiality band */
.band-dark { background: var(--ink); color: var(--on-anabi); }
.band-dark .article { border: 0; }
.nots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(28px, 4vw, 56px); margin-top: 36px; }
.nots li { padding-top: 14px; border-top: 1px solid var(--rule-dark); }
.nots h3 { font-family: var(--ui); font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.nots p { color: var(--on-anabi-soft); font-size: 1rem; line-height: 1.85; }
.band-dark .prose { color: var(--on-anabi-soft); }

/* Preparation tool */
.tool { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); margin-top: 28px; background: var(--sheet); border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule), 7px 7px 0 -1px var(--paper), 7px 7px 0 0 var(--rule); }
.topics { display: grid; align-content: start; gap: 2px; padding: 12px; border-left: 1px solid var(--rule); }
.topic { width: 100%; min-height: 48px; padding: 10px 14px; font-family: var(--ui); font-size: .98rem; text-align: right; line-height: 1.5; color: var(--ink); background: transparent; border: 0; border-radius: 2px; cursor: pointer; transition: background-color .15s, color .15s; }
.topic:hover { background: var(--paper); }
.topic[aria-pressed="true"] { background: var(--anabi); color: var(--on-anabi); }
.sheet { position: relative; padding: clamp(20px, 3vw, 32px); min-width: 0; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.sheet h3 { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.5; color: var(--anabi); }
.count { font-family: var(--ui); font-size: .92rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.docs { margin-top: 10px; }
.docs label { display: flex; align-items: flex-start; gap: 12px; padding-block: 11px; border-bottom: 1px dashed var(--rule); cursor: pointer; line-height: 1.7; }
.docs input { flex: none; width: 21px; height: 21px; margin: 5px 0 0; accent-color: var(--anabi); cursor: pointer; }
.docs input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--anabi); }
.note { margin-top: 16px; padding-inline-start: 14px; border-inline-start: 2px solid var(--anabi); font-size: 1rem; line-height: 1.8; }
.note-wide { margin-top: 28px; max-width: 62ch; }
.msg-label { margin-top: 24px; font-family: var(--ui); font-size: .9rem; color: var(--ink-soft); }
.msg { margin-top: 4px; padding: 12px 16px; background: var(--paper); font-size: 1.02rem; line-height: 1.8; overflow-wrap: anywhere; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.done { position: absolute; top: 96px; left: clamp(14px, 3vw, 30px); padding: 2px 16px 6px; font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1.4; color: var(--anabi); border: 2.5px double var(--anabi); border-radius: 3px; transform: rotate(-9deg); background: rgba(251, 248, 245, .86); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .done:not([hidden]) { animation: pressDone .32s cubic-bezier(.2, .9, .3, 1.15) both; }
  @keyframes pressDone { from { transform: rotate(-3deg) scale(1.7); opacity: .2; } to { transform: rotate(-9deg) scale(1); opacity: 1; } }
}

/* Post lists and post body */
.posts { border-top: 1px solid var(--rule); }
.posts li { border-bottom: 1px solid var(--rule); }
.posts a { display: grid; gap: 4px; padding-block: 22px; text-decoration: none; }
.post-meta { font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); }
.post-title { font-family: var(--ui); font-size: 1.2rem; font-weight: 700; line-height: 1.6; transition: color .15s; }
.post-summary { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; max-width: 62ch; }
.posts a:hover .post-title { color: var(--anabi); }
.post-body { max-width: 66ch; }
.post-body > * + * { margin-top: 1em; }
.post-body h2 { margin-top: 1.8em; font-family: var(--ui); font-size: 1.25rem; font-weight: 700; line-height: 1.6; color: var(--anabi); }
.post-body > :first-child { margin-top: 0; }
.post-body > p:first-child { font-size: 1.15rem; }
.disclaimer { margin-top: 2em !important; padding: 14px 18px; background: var(--sheet); border: 1px solid var(--rule); font-family: var(--ui); font-size: .92rem; color: var(--ink-soft); }
.small { margin-top: 16px; font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); }

/* Closing */
.closing { background: var(--anabi); color: var(--on-anabi); }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px clamp(32px, 6vw, 80px); padding-block: clamp(56px, 8vw, 88px); align-items: end; }
.closing .actions { margin-top: 24px; }
.ledger { display: grid; font-family: var(--ui); font-size: .95rem; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid rgba(246, 236, 232, .28); }
.ledger dt { color: var(--on-anabi-soft); flex: none; }
.ledger dd { margin: 0; text-align: left; }
.ledger-paper { max-width: 640px; border-top: 2px solid var(--anabi); }
.ledger-paper div { padding-block: 14px; border-bottom-color: var(--rule); }
.ledger-paper dt { color: var(--ink-soft); }
.ledger-paper a { color: var(--anabi); }
.sign { margin-top: 24px; }
.sign small { display: block; font-family: var(--ui); font-size: .85rem; color: var(--on-anabi-soft); }
.sign b { display: block; font-family: var(--display); font-size: 2.2rem; line-height: 1.5; font-weight: 700; }

/* Footer */
.foot { background: var(--anabi-deep); color: var(--on-anabi-soft); font-family: var(--ui); font-size: .9rem; line-height: 1.8; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px 48px; padding-block: 44px 32px; }
.foot-brand { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.5; color: var(--on-anabi); }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; align-content: start; }
.foot-note { font-size: .85rem; }
.foot-bottom { border-top: 1px solid rgba(246, 236, 232, .18); font-size: .82rem; }
.foot-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 28px; padding-block: 14px; }

@media (max-width: 940px) {
  .nav-link { display: none; }
  .menu { display: block; }
  .nav { gap: 10px; }
  .steps, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-3 { grid-template-columns: minmax(0, 1fr); }
  .article { grid-template-columns: minmax(0, 1fr); }
  .margin { position: static; }
  .margin .no-mark { font-size: 2.6rem; }
  .area { gap: 8px; }
  .preamble .lead-line { padding-top: 0; }
  .cover-foot { grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
  .closing-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .wrap { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
  .clauses, .nots { grid-template-columns: minmax(0, 1fr); }
  .tool { grid-template-columns: minmax(0, 1fr); box-shadow: none; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; border-bottom: 1px solid var(--rule); padding: 8px; }
  .topic { text-align: center; font-size: .9rem; padding: 8px 6px; }
  .brand b { font-size: 1.3rem; }
  .lede { font-size: 1.15rem; }
  .done { top: 88px; }
}
@media (max-width: 480px) {
  .nav-cta { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 100%; }
  .seal { width: 118px; bottom: -44px; }
  .cover-foot { padding-bottom: 104px; }
  .ledger div { flex-direction: column; gap: 0; }
  .ledger dd { text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
