/* Rewa (working name, not cleared) draft site v0.5 stylesheet. Ink on ivory; one family, sentence case, two sizes. */

/* True Arabic, the house's text face for Latin and Arabic, regular and medium. Two separate web files, never inlined.
   They are not kept in this folder: serve_preview.py serves them at /fonts/ on the founder's own computer, under the
   subscriber's licence. Anywhere else the pages fall back to a system sans-serif. */
@font-face { font-family: "True Arabic"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/TrueArabic-Regular.woff2") format("woff2"); }
@font-face { font-family: "True Arabic"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/TrueArabic-Medium.woff2") format("woff2"); }

:root {
  --page: #f3efe7;
  --sand: #e9e1d3;
  --ink: #26221e;
  --sec: #5b5043;
  --hair: #d6ccbd;
  --clay: #b19786;
  --on-ink: #f3efe7;
  --on-ink-sec: #c9beae;
  --white: #fbf8f2;
  --latin: "True Arabic", "Helvetica Neue", "Segoe UI Variable Text", Arial, sans-serif;
  --arabic: "True Arabic", "Geeza Pro", Tahoma, sans-serif;
  --big: clamp(1.75rem, 1.05rem + 1.9vw, 2.75rem);
  --small: 1rem;
  --r03: 2rem;
  --r04: 3rem;
  --r05: 4rem;
  --r06: 5rem;
  --r07: 6rem;
  --r08: 8rem;
  --margin: 64px;
  --gutter: 24px;
  --header: 85px;
  --max: 1920px;
  --ease: cubic-bezier(0, 0, 0.2, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}
@media (max-width: 1023px) { :root { --r03: 1.5rem; --r04: 2.25rem; --r05: 3rem; --r06: 4rem; --r07: 5rem; --r08: 6rem; --margin: 40px; --gutter: 16px; } }
@media (max-width: 767px) { :root { --margin: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; background: var(--ink); color: var(--ink); font-family: var(--latin); font-size: var(--small); line-height: 1.3; font-weight: 400; word-spacing: 0.05em; font-synthesis-weight: none; font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 500; font-size: var(--small); }
strong, b { font-weight: 500; }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
button, input, select, textarea { word-spacing: inherit; }
[lang="ar"] { font-family: var(--arabic); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--margin); top: 8px; z-index: 60; background: var(--ink); color: var(--page); padding: 8px 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.big { font-size: var(--big); line-height: 1.12; font-weight: 500; text-wrap: balance; }
.big, .hero .cap h2, .figures .n, .menu .sub h2, .search input, .mark { word-spacing: 0; }
.dn { font-feature-settings: "dnom" 1; }
.sec { color: var(--sec); }
.prose { line-height: 1.6; color: var(--sec); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.link { display: inline-block; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: border-color 0.15s var(--ease-io); }
.link:hover { border-bottom-color: transparent; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 3rem; border-radius: 999px; background: var(--ink); color: var(--page); font-weight: 500; border: 1px solid var(--ink); transition: background 0.15s var(--ease-io), color 0.15s var(--ease-io); }
.pill:hover { background: #3a342e; }
.pill.ghost { background: transparent; color: var(--ink); }
.pill.ghost:hover { background: var(--ink); color: var(--page); }
.cta { text-align: center; padding: 0 var(--margin) var(--r06); }

main { position: relative; z-index: 1; background: var(--page); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.block { padding: var(--r06) 0; }
.block.tall { padding: var(--r08) 0; }
.centre { text-align: center; }

/* ---------- header (z 30): solid bar; menu, split navigation, centred mark, search ---------- */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header); background: var(--page); }
.site-header .bar { height: 100%; display: grid; grid-template-columns: 48px 3fr auto 3fr 48px; align-items: center; padding: 0 36px; }
@media (max-width: 767px) { .site-header .bar { padding: 0 16px; } }
.site-header .bar > .mark { justify-self: center; }
.site-header .nav { display: flex; align-items: center; }
.site-header .nav-l { justify-content: flex-end; }
.site-header .nav-r { justify-content: flex-start; }
.site-header .nav li { padding: 12px 20px; }
@media (min-width: 1536px) { .site-header .nav li { padding-inline: 64px; } }
.site-header .nav a { position: relative; display: inline-block; padding: 6px 0; white-space: nowrap; }
.site-header .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-io); }
.site-header .nav a:hover::after, .site-header .nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.icon-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.site-header .search-btn { justify-self: end; }
.mark { display: grid; justify-items: center; line-height: 1; padding: 0 1.5rem; }
.mark .l { font-size: 1.5rem; font-weight: 500; }
.mark [lang="ar"] { font-size: 1.65rem; font-weight: 500; margin-top: 0.15rem; }
@media (max-width: 1279px) {
  .site-header .bar { grid-template-columns: 48px 1fr auto 1fr 48px; }
  .site-header .nav { display: none; }
  .site-header .bar > .mark { grid-column: 3; }
  .site-header .bar > .search-btn { grid-column: 5; }
}
@media (max-width: 1024px) { .mark .l { font-size: 1.3rem; } .mark [lang="ar"] { font-size: 1.43rem; } }

/* ---------- menu (z 40): a drawer from the left over a dark scrim; submenus slide across ---------- */
.menu { position: fixed; inset: 0; z-index: 40; visibility: hidden; transition: visibility 0s linear 0.3s; }
.menu.is-open { visibility: visible; transition: none; }
.menu .scrim { position: absolute; inset: 0; width: 100%; background: rgba(38, 34, 30, 0.8); opacity: 0; transition: opacity 0.15s var(--ease-io); border: 0; padding: 0; cursor: pointer; }
.menu.is-open .scrim { opacity: 1; }
.menu .panel { position: absolute; inset: 0 auto 0 0; width: min(390px, 100%); background: var(--page); border-right: 1px solid var(--hair); border-radius: 0 8px 8px 0; display: flex; flex-direction: column; padding: 20px 0 40px; transform: translateX(-100%); opacity: 0; transition: transform 0.3s var(--ease-io), opacity 0.3s var(--ease-io); overflow: hidden; }
.menu.is-open .panel { transform: none; opacity: 1; transition-duration: 0.5s; }
.menu .panel .top { display: flex; justify-content: space-between; align-items: center; padding: 0 24px 20px; min-height: 44px; }
.menu .panel .back { background: none; border: 0; padding: 0.5rem 0; cursor: pointer; visibility: hidden; border-bottom: 1px solid currentColor; }
.menu .panel.is-sub .back { visibility: visible; }
.menu .panel .mark { margin: 0.5rem auto 1.5rem; }
.menu .levels { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; }
.menu .lists { display: flex; width: 100%; transition: transform 0.3s var(--ease-io); }
.menu .panel.is-sub .lists { transform: translateX(-100%); }
.menu .panel.is-sub .lists > ul { visibility: hidden; transition: visibility 0s linear 0.3s; }
.menu .panel:focus, .search .inner:focus { outline: none; }
.menu .lists > * { flex: 0 0 100%; padding: 0 24px; }
.menu nav ul { display: grid; gap: var(--r04); justify-items: center; text-align: center; padding: var(--r03) 0; }
.menu nav a, .menu nav button.parent { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 500; border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color 0.15s var(--ease-io); }
.menu nav a:hover, .menu nav button.parent:hover, .menu nav a[aria-current="page"] { border-bottom-color: currentColor; }
.menu .sub h2 { text-align: center; font-size: var(--big); line-height: 1.1; margin: var(--r03) 0 0; }
.menu .sub ul a { font-weight: 400; }
.menu .panel .foot { padding: var(--r03) 24px 0; color: var(--sec); display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
@media (max-width: 767px) { .menu .panel { width: 100%; border-radius: 0; border-right: 0; } }

/* ---------- search page-overlay (z 45) ---------- */
.search { position: fixed; inset: 0; z-index: 45; background: var(--page); visibility: hidden; opacity: 0; transition: opacity 0.3s var(--ease-io), visibility 0s linear 0.3s; overflow-y: auto; }
.search.is-open { visibility: visible; opacity: 1; transition: opacity 0.3s var(--ease-io); }
.search .top { height: var(--header); display: flex; justify-content: flex-end; align-items: center; padding: 0 var(--margin); }
.search .inner { max-width: 59rem; margin: 0 auto; padding: var(--r05) 2rem var(--r08); }
.search label { display: block; text-align: center; color: var(--sec); margin-bottom: 1rem; }
.search input { width: 100%; font: inherit; font-size: var(--big); font-weight: 500; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 0.4rem 0; border-radius: 0; text-align: center; }
.search input:focus { outline: none; border-bottom-width: 2px; }
.search .hint { text-align: center; color: var(--sec); margin-top: 0.75rem; }
.search .results { margin-top: var(--r05); display: grid; }
.search .results a { display: grid; gap: 0.3rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); }
.search .results a:hover strong { border-bottom: 1px solid currentColor; }
.search .results span { color: var(--sec); }
.search .none { text-align: center; color: var(--sec); }

/* ---------- full-screen opening slider (home): caption on the picture, segment bars ---------- */
.hero { --capb: clamp(7rem, 5.5rem + 2vw, 8rem); --capfade: 260px; position: relative; aspect-ratio: 2 / 1; max-height: calc(100svh - var(--header)); width: 100%; overflow: clip; background: var(--ink); color: var(--white); }
.hero figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1); }
.hero figure.is-on { opacity: 1; }
.hero figure { touch-action: pan-y; }
.hero figure:not(.is-on) { pointer-events: none; }
.hero .cover { position: absolute; inset: 0; z-index: 2; }
.hero .cover:focus-visible { outline-offset: -6px; outline-color: var(--white); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero figure::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(26, 23, 20, 0.66) 0, rgba(26, 23, 20, 0.58) var(--capb), rgba(26, 23, 20, 0.45) calc(var(--capb) + var(--capfade) * 0.58), rgba(26, 23, 20, 0) calc(var(--capb) + var(--capfade))); pointer-events: none; }
.hero .cap { position: absolute; left: 0; right: 0; bottom: var(--capb); text-align: center; padding: 0 var(--margin); z-index: 2; pointer-events: none; }
.hero .cap > div { position: absolute; left: var(--margin); right: var(--margin); bottom: 0; opacity: 0; transition: opacity 0.15s linear 1s; }
.hero .cap > div.is-on { opacity: 1; }
.hero .cap h2 { font-size: var(--big); line-height: 1.12; font-weight: 500; text-wrap: balance; }
.hero .cap p { margin: 1.5rem 0 0; }
.hero .bars { position: absolute; left: var(--margin); right: calc(var(--margin) + 52px); bottom: 0; z-index: 3; display: flex; gap: 8px; }
.hero .bars button { flex: 1; height: 50px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.hero .bars button::before { content: ""; position: absolute; left: 0; right: 0; top: 24px; height: 2px; background: rgba(251, 248, 242, 0.6); }
.hero .bars button[aria-current="true"]::before { background: var(--white); }
.hero .toggle { position: absolute; right: var(--margin); bottom: 14px; z-index: 3; }
.hero .toggle svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
@media (max-width: 767px) {
  .hero { aspect-ratio: 1; max-height: none; --capb: 5rem; --capfade: 220px; }
  .hero .cap p { margin: 0.75rem 0 0; }
}

/* ---------- page intro and back link ---------- */
.intro { text-align: center; padding: var(--r06) 0; }
.intro .back { display: inline-block; color: var(--sec); border-bottom: 1px solid currentColor; padding-bottom: 2px; margin-bottom: var(--r03); }
.intro .back:hover { border-bottom-color: transparent; }
.intro .big { max-width: 22ch; margin: 0 auto; }
.intro .prose { max-width: 40rem; margin: var(--r03) auto 0; }
.intro .strap { margin-top: var(--r03); color: var(--sec); }

/* ---------- edge-to-edge banner with a slow parallax and a load-in settle ---------- */
.banner { --travel: 150px; position: relative; margin: 0; aspect-ratio: 2 / 1; overflow: clip; background: var(--sand); view-timeline-name: --banner; }
.banner .layer { position: absolute; inset: 0; display: block; }
.banner picture { display: block; height: 100%; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1279px) { .banner { --travel: 100px; } }
@media (max-width: 767px) { .banner { aspect-ratio: 1; --travel: 60px; } }
@media (min-width: 768px) { .banner.narrow { --travel: 0px; } }
@media (prefers-reduced-motion: no-preference) {
  .banner img { animation: settle 1s var(--ease) 0.5s both; }
  @keyframes settle { from { transform: scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }
  @supports (animation-timeline: view()) {
    .banner .layer { inset: calc(var(--travel) * -1) 0; animation: drift linear both; animation-timeline: --banner; animation-range: cover; }
    @keyframes drift { from { transform: translateY(calc(var(--travel) * -1)); } to { transform: translateY(var(--travel)); } }
  }
}

/* ---------- statement block ---------- */
.statement { text-align: center; padding: var(--r06) 0; }
.statement .inner { max-width: 50rem; margin: 0 auto; }
.statement h2 { margin-bottom: var(--r03); }
.statement h2.big { margin-bottom: var(--r03); }
.statement .meta { color: var(--sec); margin: -1rem 0 var(--r03); }
.statement .prose { max-width: 40rem; margin: 0 auto; }
.statement .after { margin-top: var(--r05); }

/* ---------- quote banner ---------- */
.quote { text-align: center; padding: var(--r06) 0; }
.quote .inner { max-width: 54rem; margin: 0 auto; display: grid; gap: var(--r05); justify-items: center; }
.quote .mk { display: block; width: 48px; height: 39px; }
.quote .mk path { fill: currentColor; }
.quote blockquote { margin: 0; }
.quote cite { font-style: normal; display: grid; gap: 0.5rem; justify-items: center; }
.quote cite [lang="ar"] { font-weight: 500; }
.quote cite span:last-child { color: var(--sec); }

/* ---------- split block: square picture with zoom reveal beside centred copy; sides alternate ---------- */
.split { padding: var(--r06) 0; }
.split .inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: center; }
.split .pic { aspect-ratio: 1; overflow: hidden; background: var(--sand); }
.split .pic img { width: 100%; height: 100%; object-fit: cover; }
.split .copy { text-align: center; display: grid; justify-items: center; gap: 1.25rem; }
.split .copy .meta { color: var(--sec); margin-top: -0.6rem; }
.split .copy .link { margin-top: 0.75rem; }
.split.left .copy { order: -1; padding-right: 24px; }
.split:not(.left) .copy { padding-left: 24px; }
@media (min-width: 1024px) { .split.left .copy { padding-right: 48px; } .split:not(.left) .copy { padding-left: 48px; } }
@media (min-width: 1280px) {
  .split .inner { margin-inline: calc((100% - 11 * var(--gutter)) / 12 + var(--gutter)); }
  .split .copy { max-width: 579px; padding: 0 !important; }
  .split.left .copy { margin: 0 auto 0 0; }
  .split:not(.left) .copy { margin: 0 0 0 auto; }
}
@media (max-width: 767px) {
  .split .inner { grid-template-columns: 1fr; gap: var(--r05); }
  .split.left .copy { order: 0; }
  .split .copy { padding: 0 !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .split .copy { transform: translateY(80px); opacity: 0; transition: transform 1s var(--ease), opacity 1s var(--ease); }
  .js .split .pic img { transform: scale(1.25); transition: transform 1s var(--ease); }
  .js .split.is-in .copy { transform: none; opacity: 1; }
  .js .split.is-in .pic img { transform: none; }
}

/* ---------- card rails: drag sideways, labels under the pictures ---------- */
.rail { padding: var(--r06) 0; }
.rail .title { text-align: center; padding: 0 var(--margin); margin-bottom: var(--r04); }
.rail .title p { color: var(--sec); margin: 0.75rem auto 0; max-width: 40rem; line-height: 1.6; }
.rail .track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card); gap: var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-left: var(--margin); padding: 0 var(--margin) 4px; scrollbar-width: none; cursor: grab; }
.rail .track::-webkit-scrollbar { display: none; }
.rail .track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.rail .track.is-drag a { pointer-events: none; }
.rail .item { scroll-snap-align: start; display: grid; gap: var(--r03); align-content: start; text-align: center; }
.rail .pic { aspect-ratio: 1; overflow: hidden; background: var(--sand); }
.rail .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); -webkit-user-drag: none; user-select: none; }
.rail .item:hover .pic img { transform: scale(1.1); }
.rail .item .meta { color: var(--sec); margin: 0; }
.rail .item .meta + h3 { margin-top: -1rem; }
.rail .nav { display: flex; justify-content: center; gap: 0.5rem; margin-top: var(--r04); padding: 0 var(--margin); }
.rail .nav .icon-btn { border: 1px solid var(--hair); border-radius: 50%; }
.rail .nav .icon-btn svg { width: 18px; height: 18px; }
.rail .nav .icon-btn[disabled] { opacity: 0.35; cursor: default; }
.rail.tiles { --card: min(calc(50vw - var(--margin) - 16px), calc((1920px + var(--margin)) / 2 - 16px)); }
.rail.tiles .track { gap: 16px; }
.rail.cards { --card: 366px; }
@media (min-width: 768px) { .rail.cards { --card: 423px; } }
@media (min-width: 1024px) { .rail.cards { --card: 498px; } }
@media (min-width: 1280px) { .rail.cards { --card: 573px; } }
@media (min-width: 1536px) { .rail.cards { --card: 605px; } }
@media (max-width: 767px) { .rail.tiles { --card: calc(100vw - 2 * var(--margin) - 16px); } .rail.cards { --card: calc(100vw - var(--margin) - 3rem); } }

/* ---------- edge-to-edge gallery with segment bars ---------- */
.gallery { padding: var(--r06) 0; }
.gallery .frame { position: relative; overflow: hidden; background: var(--sand); }
.gallery .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.gallery .slides::-webkit-scrollbar { display: none; }
.gallery .slides figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.gallery .slides img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.gallery .frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(to top, rgba(26, 23, 20, 0.62) 0%, rgba(26, 23, 20, 0) 100%); pointer-events: none; }
.gallery .bars { position: absolute; left: var(--margin); right: var(--margin); bottom: 24px; z-index: 2; display: flex; gap: 8px; }
.gallery .bars button { flex: 1; height: 24px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.gallery .bars button::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: rgba(251, 248, 242, 0.6); }
.gallery .bars button[aria-current="true"]::before { background: var(--white); }
@media (max-width: 767px) { .gallery .slides img { aspect-ratio: 1; } }
@media (prefers-reduced-motion: reduce) { .gallery .slides { scroll-behavior: auto; } }

/* ---------- figures row with count-up ---------- */
.figures { padding: var(--r08) 0; text-align: center; }
.figures .row { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--r04) var(--gutter); margin: var(--r06) 0 0; }
@media (min-width: 768px) { .figures .row { margin-inline: calc((100% - 11 * var(--gutter)) / 12 + var(--gutter)); } }
@media (min-width: 1280px) { .figures .row { margin-inline: calc(2 * (100% - 11 * var(--gutter)) / 12 + 2 * var(--gutter)); padding-inline: 40px; } }
.figures .n { display: block; font-size: var(--big); line-height: 1.1; font-weight: 500; }
.figures .row p { margin: 1.25rem auto 0; color: var(--sec); line-height: 1.45; }
.strip { display: grid; grid-template-columns: repeat(96, 1fr); gap: 2px; align-items: end; height: 26px; max-width: 20rem; margin: 1.1rem auto 0; }
.strip i { display: block; height: 50%; background: var(--hair); transition: background 0.5s ease; }
.strip i:nth-child(4n+1) { height: 100%; }
.strip.is-full i, .no-js .strip i { background: var(--ink); }
.strip.wide { max-width: none; height: 56px; margin: var(--r04) 0 0; }
.hours { display: flex; justify-content: space-between; color: var(--sec); margin-top: 0.5rem; }
@media (max-width: 767px) { .figures .row { grid-template-columns: 1fr; } }

/* ---------- rich-text block: the long lists, left-aligned in six centre columns ---------- */
.rich { padding: var(--r06) 0; }
.rich .inner { max-width: 46rem; margin: 0 auto; }
.rich .inner.widen { max-width: 64rem; }
.rich h2 { text-align: center; margin-bottom: var(--r04); }
.rich h2.big { margin-bottom: var(--r04); }
.rich .lead { text-align: center; color: var(--sec); line-height: 1.6; margin: calc(var(--r04) * -0.5) auto var(--r04); max-width: 40rem; }
.rich ol.list, .rich ul.list { counter-reset: n; border-top: 1px solid var(--ink); }
.rich .list > li { display: grid; grid-template-columns: 3rem 1fr; gap: 0 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--hair); }
.rich ul.list > li { grid-template-columns: 1fr; }
.rich ol.list > li::before { counter-increment: n; content: counter(n, decimal-leading-zero); color: var(--sec); grid-row: span 3; }
.rich .list h3 { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.rich .list h3 .tag { font-weight: 400; color: var(--sec); white-space: nowrap; }
.rich .list p { margin: 0.4rem 0 0; line-height: 1.55; color: var(--sec); }
.rich .list p.how { color: var(--ink); }
.rich .list p.how::before { content: "How we keep it: "; color: var(--sec); }
.rich .note { color: var(--sec); line-height: 1.6; margin-top: var(--r04); text-align: center; }
.rich .cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--r04) clamp(1.5rem, 0.5rem + 4vw, 5rem); }
@media (max-width: 767px) { .rich .cols { grid-template-columns: 1fr; } .rich ol.list > li { grid-template-columns: 2.25rem 1fr; } }

/* a table of what is read and what is tested */
.table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--hair); line-height: 1.45; }
.table thead th { color: var(--sec); font-weight: 400; }
.table tbody th { font-weight: 500; width: 30%; }
.table td { color: var(--sec); }
.table td.us { color: var(--ink); font-weight: 500; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: grid; border-bottom: 1px solid var(--hair); padding: 0.75rem 0; }
  .table th, .table td { border: 0; padding: 0.15rem 0; width: auto !important; }
  .table td[data-k]::before { content: attr(data-k) ": "; color: var(--ink); }
}

/* compare, two lists, steps (work with us) */
.compare { display: grid; grid-template-columns: 8rem 1fr 1fr; border-top: 1px solid var(--ink); }
.compare > * { padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--hair); line-height: 1.45; }
.compare .th { color: var(--sec); }
.compare .us { font-weight: 500; }
@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr 1fr; }
  .compare .k { grid-column: 1 / -1; padding-bottom: 0; border-bottom: 0; font-weight: 500; }
  .compare .th.k { display: none; }
}
.steps { counter-reset: s; border-top: 1px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 3rem 7rem 1fr; gap: 0 1rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); line-height: 1.45; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); color: var(--sec); }
.steps span { color: var(--sec); }
@media (max-width: 640px) { .steps li { grid-template-columns: 2.25rem 1fr; } .steps li span { grid-column: 2; } }

/* the two passports */
.passports { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.passports.one { grid-template-columns: 1fr; max-width: 40rem; margin: 0 auto; }
.doc { background: var(--page); border: 1px solid var(--hair); padding: clamp(1.25rem, 0.8rem + 1.6vw, 2.5rem); display: grid; gap: 1.5rem; align-content: start; text-align: left; }
.doc header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.9rem; font-weight: 500; }
.doc dl { margin: 0; display: grid; }
.doc dl div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--hair); }
.doc dt { color: var(--sec); }
.doc dd { margin: 0; }
@media (max-width: 860px) { .passports { grid-template-columns: 1fr; } }

/* scale of 211 points */
.scale { display: grid; grid-template-columns: repeat(211, 1fr); gap: 1px; height: 40px; align-items: end; margin: var(--r04) 0 0.8rem; }
.scale i { display: block; height: 50%; background: var(--hair); }
.scale i.w { background: var(--clay); }
.scale i.r { background: var(--ink); }
.scale i:nth-child(10n) { height: 100%; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2rem; color: var(--sec); }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 8px; background: var(--c); vertical-align: -1px; }

/* in-page jump row */
.jump { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 2.5rem; padding: var(--r04) var(--margin) 0; }
.jump a { border-bottom: 1px solid transparent; padding-bottom: 2px; color: var(--sec); }
.jump a:hover { border-bottom-color: currentColor; color: var(--ink); }

/* form */
.form { display: grid; gap: 1.75rem; max-width: 52.8rem; margin: 0 auto; padding: 0 1.5rem; }
.form .row { display: grid; gap: 0.35rem; }
.form label { color: var(--sec); }
.form .help { color: var(--sec); line-height: 1.45; }
.form input, .form select, .form textarea { font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #6e6458; border-radius: 0; padding: 0.6rem 0; width: 100%; }
.form textarea { min-height: 7rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2.5rem; }
.form button { justify-self: center; height: 64px; padding: 0 3rem; border-radius: 999px; font-weight: 500; background: var(--ink); color: var(--page); border: 0; margin-top: 2.5rem; cursor: pointer; }
.form button[disabled] { cursor: not-allowed; opacity: 0.6; }
.draft-box { border: 1px solid var(--clay); background: var(--sand); padding: 1rem 1.15rem; line-height: 1.5; }
@media (max-width: 640px) { .form .two { grid-template-columns: 1fr; } }

/* ---------- footer on ink, revealed from under the page ---------- */
.site-footer { position: relative; z-index: 0; background: var(--ink); color: var(--on-ink); padding: var(--r07) 0; }
.site-footer.is-reveal { position: sticky; bottom: 0; }
.site-footer .mark { margin: 0 auto var(--r06); width: max-content; }
.site-footer .mark .l { font-size: 1.75rem; }
.site-footer .mark [lang="ar"] { font-size: 1.925rem; }
.site-footer .groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--r04) var(--gutter); }
.site-footer h2 { margin-bottom: 1.25rem; }
.site-footer li { margin-bottom: 0.75rem; }
.site-footer li a { color: var(--on-ink-sec); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color 0.15s var(--ease-io), color 0.15s var(--ease-io); }
.site-footer li a:hover { color: var(--on-ink); border-bottom-color: currentColor; }
.site-footer .legal { margin-top: var(--r06); padding-top: var(--r03); border-top: 1px solid rgba(243, 239, 231, 0.2); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; color: var(--on-ink-sec); line-height: 1.45; }
.site-footer .legal p { margin: 0; }
@media (max-width: 767px) {
  .site-footer .groups { grid-template-columns: 1fr 1fr; }
  .site-footer .legal { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero figure, .hero .cap > div, .menu .panel, .menu .scrim, .menu .lists, .menu .lists > ul, .search { transition: none !important; }
  .rail .pic img { transition: none; }
}

/* ---------- v0.4: the deck's chapters, its service rows, the six things, WELL points ---------- */
.intro .chapter { margin: 0 0 var(--r03); color: var(--sec); }
.intro .chapter a { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.intro .chapter a:hover { border-bottom-color: transparent; }
.intro .chapter [lang="ar"] { margin-left: 0.6rem; white-space: nowrap; }
.menu .sub h2 [lang="ar"] { display: block; font-size: var(--small); line-height: 1.3; margin-top: 0.6rem; color: var(--sec); word-spacing: 0.05em; }
.rich .list h4 { margin: 0; font-size: var(--small); font-weight: 500; }
.rich .cols .col-h { text-align: left; margin-bottom: 1rem; }
.services { padding: var(--r06) 0; }
.services .head { text-align: center; max-width: 40rem; margin: 0 auto var(--r04); }
.services .head p { margin: 0.75rem 0 0; color: var(--sec); }
.services .row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--r03) 16px; }
.services .pic { aspect-ratio: 1; overflow: hidden; background: var(--sand); }
.services .pic img { width: 100%; height: 100%; object-fit: cover; }
.services li p { margin: 0.9rem 0 0; text-align: center; }
.services .note { color: var(--sec); line-height: 1.6; text-align: center; max-width: 46rem; margin: var(--r04) auto 0; }
@media (max-width: 1023px) { .services .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .services .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pairs { margin: 0 0 1em; border-top: 1px solid var(--hair); }
.pairs li { padding: 0.75rem 0; border-bottom: 1px solid var(--hair); }
.pairs strong { display: block; color: var(--ink); }
ul.bars { border-top: 1px solid var(--ink); }
ul.bars li { display: grid; grid-template-columns: 9rem 1fr 2.5rem; gap: 1rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--hair); }
ul.bars i { display: block; height: 10px; width: calc(var(--v) / 33 * 100%); background: var(--clay); }
ul.bars b { font-weight: 500; text-align: right; }
@media (max-width: 640px) { ul.bars li { grid-template-columns: 7rem 1fr 2rem; } }

/* v0.5: BRAND_GUIDELINES 8A, Arabic word space. Two spaces of the chapter title are opened, on top of the small text's
   0.05em: the one the damma of its second word hangs over, and the one the tail of that word's seen runs into
   (measured in True Arabic regular; build_site.py AR_OPEN). An empty inline box adds the width, at any size. */
.wo-m { padding-left: 0.042em; }
.wo-t { padding-left: 0.168em; }
.no-ta .wo-m, .no-ta .wo-t { padding-left: 0; }  /* True Arabic only; another face needs no opening */
