/* Dar al Qalam Kuttab website. Brand: guidelines edition 1.2. */
@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Felfel"; src: url("../fonts/felfel-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Uthman Taha"; src: url("../fonts/uthman-taha.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --teal: #0E3D3F;
  --teal-2: #164B4D;
  --teal-3: #0A2F31;
  --gold: #C8963E;
  --gold-lt: #D9B56E;
  --gold-ink: #8A6420;
  --gold-ink-deep: #775418;
  --parch: #F6F1E7;
  --parch-2: #EDE6D6;
  --paper: #FBF8F1;
  --line: #D9CFBB;
  --line-teal: rgba(217, 181, 110, .28);
  --muted: #56655F;
  --muted-teal: #DCD3BF;
  /* Tints: teal or gold mixed into parchment, one per programme area */
  --sage: #E3EBE6;
  --sand: #F1E7D0;
  --mist: #DCE7E5;
  --stone: #E9E3D6;

  --en: "Marcellus", "Trajan Pro", Georgia, serif;
  --sm: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --ar: "Felfel", "Geeza Pro", "Noto Kufi Arabic", sans-serif;
  --ar-text: "Uthman Taha", "KFGQPC Uthman Taha Naskh", "Amiri", serif;

  --gutter: clamp(16px, 4.5vw, 64px);
  --max: 1240px;
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 40px; --sp-5: 64px; --sp-6: clamp(72px, 10vw, 128px);
  --r: 4px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 18px 40px -18px rgba(10, 47, 49, .35), 0 2px 6px -2px rgba(10, 47, 49, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--parch); color: var(--teal); font-family: var(--sm); font-size: 1.0625rem; line-height: 1.65; font-weight: 400; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--en); font-weight: 400; margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: .005em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }
::selection { background: var(--gold-lt); color: var(--teal); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--teal-2) var(--parch-2); }

.in { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[lang="ar"] { font-family: var(--ar); font-weight: 700; direction: rtl; }
.ar-text { font-family: var(--ar-text); font-weight: 700; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: var(--teal-3); padding: 10px 16px; border-radius: 999px; font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

/* Surfaces */
.on-teal { background: var(--teal); color: var(--parch); --m-arch: var(--parch); --m-pen: var(--teal); }
.on-parch { --m-arch: var(--teal); --m-pen: var(--parch); }
.pat { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arsvg { fill: currentColor; height: 1em; width: auto; overflow: visible; }

/* Threshold rule and gold dot */
.rule { display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--gold); border: 0; margin: 0; }
.dot { display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; font: 500 1rem/1.2 var(--sm); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold { background: var(--gold); color: var(--teal-3); }
.btn-gold:hover { background: var(--gold-lt); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); box-shadow: none; }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn-line:hover { background: rgba(217, 181, 110, .14); border-color: var(--gold); }
.btn-teal { background: var(--teal); color: var(--parch); }
.btn-teal:hover { background: var(--teal-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1.0625rem; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* Header: a floating glass pill */
.site-head { position: fixed; inset: 14px 0 auto; z-index: 40; color: var(--parch); padding-inline: clamp(10px, 2vw, 24px); pointer-events: none; }
.bar { pointer-events: auto; position: relative; isolation: isolate; max-width: calc(var(--max) + 2 * var(--gutter) - 32px); margin-inline: auto; display: flex; align-items: center; gap: var(--sp-3); min-height: 66px; padding: 8px 8px 8px 22px; border-radius: 999px; transition: min-height .4s var(--ease), padding .4s var(--ease); }
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(10, 47, 49, .5); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); border: 1px solid rgba(217, 181, 110, .22); box-shadow: inset 0 1px 0 rgba(246, 241, 231, .14), 0 18px 40px -26px rgba(4, 22, 23, .7); transition: background-color .4s var(--ease); }
.scrolled .bar { min-height: 58px; padding-block: 5px; }
.scrolled .bar::before { background: rgba(10, 47, 49, .84); }
.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; --m-arch: var(--parch); --m-pen: var(--teal); }
.brand .mark { width: 26px; height: 32px; }
.brand .div { width: 1px; align-self: stretch; margin-block: 4px; background: var(--gold); opacity: .7; }
.brand .txt { display: grid; gap: 4px; }
.brand .arsvg { height: 15px; }
.brand .en { font-family: var(--en); letter-spacing: .2em; font-size: .84rem; line-height: 1; text-transform: uppercase; }
.nav { margin-left: auto; flex: 1; display: flex; align-items: center; gap: 12px; }
.links { margin-inline: auto; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(246, 241, 231, .07); box-shadow: inset 0 1px 0 rgba(246, 241, 231, .1); }
.nl { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; color: inherit; font: 400 .96rem/1 var(--sm); text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), color .2s; }
.nl:hover, .dd-btn[aria-expanded="true"] { background: rgba(246, 241, 231, .1); }
.nl[aria-current="page"], .dd-btn[data-current] { background: rgba(217, 181, 110, .18); color: var(--gold-lt); }
.chev { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.dd-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acts { display: flex; align-items: center; gap: 8px; }
.wa { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; color: var(--gold-lt); text-decoration: none; font-size: .95rem; transition: background-color .2s; }
.wa:hover { background: rgba(246, 241, 231, .1); }
.wa svg { width: 20px; height: 20px; }
.wa .wa-t { color: var(--parch); }
.acts .btn { min-height: 46px; padding-inline: 24px; }

/* Programmes panel */
.dd-panel { position: absolute; top: calc(100% + 10px); left: 50%; width: min(900px, calc(100vw - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 10px; padding: 10px; border-radius: 22px; color: var(--teal); background: rgba(251, 248, 241, .94); -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 30px 60px -30px rgba(4, 22, 23, .55), 0 2px 8px -4px rgba(4, 22, 23, .2);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px) scale(.985); transform-origin: top center; filter: blur(4px); transition: opacity .28s var(--ease), transform .4s var(--ease), filter .3s var(--ease), visibility 0s .3s; }
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); filter: none; transition-delay: 0s; }
.dd-main { display: grid; align-content: space-between; gap: 8px; padding: 8px; }
.dd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dd-item { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; padding: 12px; border-radius: 14px; text-decoration: none; transition: background-color .2s var(--ease); }
.dd-item:hover, .dd-item[aria-current="page"] { background: var(--tint); }
.dd-item .well { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--teal); transition: background-color .2s, color .2s; }
.dd-item:hover .well { background: var(--teal); color: var(--gold-lt); }
.dd-item .ico { width: 30px; height: 30px; }
.dd-item .t { display: grid; gap: 2px; }
.dd-item [lang="ar"] { font-size: .95rem; color: var(--gold-ink); justify-self: start; line-height: 1.3; }
.dd-item b { font-family: var(--en); font-weight: 400; font-size: 1.2rem; line-height: 1.2; }
.dd-item .d { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.dd-foot { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 12px 12px 4px; border-top: 1px solid var(--line); font-size: .92rem; }
.dd-card { position: relative; display: grid; align-content: end; gap: 6px; padding: 18px; border-radius: 16px; overflow: hidden; text-decoration: none; background: linear-gradient(180deg, var(--teal-2), var(--teal-3)); min-height: 280px; }
.dd-card .arch { position: absolute; left: 50%; top: 22px; width: 58%; aspect-ratio: 5 / 6; transform: translateX(-50%); border-radius: 999px 999px 0 0; border: 1.5px solid var(--gold-lt); overflow: hidden; display: grid; place-items: center; background: var(--teal-2); transition: transform .5s var(--ease); }
.dd-card .arch::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gold); }
.dd-card .arch img { width: 100%; height: 100%; object-fit: cover; }
.dd-card .mk { width: 34%; position: relative; }
.dd-card:hover .arch { transform: translateX(-50%) translateY(-4px); }
.dd-card b { font-family: var(--en); font-weight: 400; font-size: 1.3rem; color: var(--parch); position: relative; }
.dd-card > span:last-child { color: var(--muted-teal); font-size: .9rem; line-height: 1.45; position: relative; }

.menu-btn { display: none; position: relative; z-index: 2; margin-left: auto; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line-teal); background: transparent; color: inherit; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }
@media (min-width: 941px) and (max-width: 1120px) { .brand .div, .brand .arsvg { display: none; } .wa .wa-t { display: none; } .nl { padding-inline: 12px; } }
@media (max-width: 940px) {
  .bar { padding-left: 18px; min-height: 60px; }
  .menu-btn { display: inline-flex; }
  .nav { position: fixed; inset: 0; z-index: 1; background: var(--teal); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 110px var(--gutter) 40px; margin: 0; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .links { margin: 0; flex-direction: column; align-items: stretch; padding: 0; background: none; box-shadow: none; gap: 0; }
  .nl { font-family: var(--en); font-size: 1.75rem; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line-teal); min-height: 0; }
  .nl[aria-current="page"], .dd-btn[data-current], .nl:hover { background: none; }
  .dd-btn { display: none; }
  .dd-panel { position: static; width: auto; transform: none; opacity: 1; visibility: visible; filter: none; display: block; padding: 0; background: none; border: 0; box-shadow: none; color: var(--parch); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .dd-main { padding: 0; }
  .dd-list { grid-template-columns: 1fr; gap: 0; }
  .dd-item { grid-template-columns: 1fr; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line-teal); }
  .dd-item:hover, .dd-item[aria-current="page"] { background: none; }
  .dd-item .well, .dd-item .d, .dd-card { display: none; }
  .dd-item b { font-size: 1.75rem; }
  .dd-item [lang="ar"] { color: var(--gold-lt); }
  .dd-foot { border: 0; padding: 14px 0 8px; font-size: 1rem; }
  .dd-foot .link-arrow { color: var(--parch); }
  .dd-foot a[href="kids.html"] { display: none; }
  .acts { margin-top: 24px; flex-wrap: wrap; }
  .acts .btn { flex: 1; }
  .wa { border: 1px solid var(--line-teal); padding-inline: 18px; }
}
@media (max-width: 420px) { .brand .div, .brand .arsvg { display: none; } }

/* Home hero: the mushaf video fills the stage */
.stage { position: relative; overflow: hidden; min-height: clamp(640px, 94vh, 920px); display: grid; align-items: end; padding: 120px 0 clamp(150px, 16vw, 200px); background: var(--teal-3); }
.media-wrap { position: absolute; inset: 0; }
.media-wrap .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { background: radial-gradient(60% 55% at 78% 22%, rgba(217, 181, 110, .26), transparent 70%), radial-gradient(45% 40% at 12% 85%, rgba(22, 75, 77, .9), transparent 70%), linear-gradient(180deg, var(--teal-2), var(--teal-3)); }
.ph-note { position: absolute; right: var(--gutter); top: calc(6% + 110px); display: inline-flex; align-items: baseline; gap: 10px; max-width: 34ch; padding: 8px 14px; border-radius: 999px; border: 1px dashed rgba(217, 181, 110, .6); color: var(--muted-teal); font-size: .82rem; background: rgba(10, 47, 49, .4); }
.ph-note .dot { transform: translateY(-1px) rotate(45deg); }
/* The page is bright cream, so a teal veil carries the headline on the left and fades to clear glass on the right */
.scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(10, 47, 49, .9) 0%, rgba(10, 47, 49, .66) 38%, rgba(10, 47, 49, .18) 72%, rgba(10, 47, 49, .08) 100%), linear-gradient(180deg, rgba(10, 47, 49, .6) 0%, rgba(10, 47, 49, 0) 30%, rgba(10, 47, 49, .78) 100%); }
.stage:not(.has-photo) .scrim { display: none; }
.pat-front { height: 140%; will-change: transform; }
.pat-front { transform: translate3d(0, calc(var(--sy, 0) * .06px), 0); }
#archdraw .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js #archdraw .draw { animation: drawin 2.6s var(--ease) .5s both; }
@keyframes drawin { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.stage-in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(32px, 6vw, 96px); align-items: end; width: 100%; }
.stage h1 { font-size: clamp(2.6rem, 5.6vw, 5.25rem); line-height: 1.02; letter-spacing: -.005em; max-width: 14ch; }
.stage .lede { margin-top: var(--sp-3); max-width: 46ch; color: var(--muted-teal); font-size: clamp(1.05rem, 1.4vw, 1.2rem); }

.vid-btn { position: absolute; z-index: 4; right: var(--gutter); top: 100px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-teal); background: rgba(10, 47, 49, .55); color: var(--parch); display: grid; place-items: center; cursor: pointer; }
.vid-btn:hover { background: rgba(10, 47, 49, .8); border-color: var(--gold-lt); }
.vid-btn svg { width: 18px; height: 18px; }
.vid-btn .i-play, .vid-btn[aria-pressed="true"] .i-pause { display: none; }
.vid-btn[aria-pressed="true"] .i-play { display: block; }

/* The finder card overlaps the hero, like a board laid across the threshold */
.finder-wrap { position: relative; z-index: 5; margin-top: calc(-1 * clamp(120px, 13vw, 168px)); }
.finder { position: relative; padding: clamp(24px, 3.4vw, 44px) clamp(22px, 3.6vw, 52px); border-radius: 22px; background: rgba(10, 47, 49, .86); -webkit-backdrop-filter: blur(22px) saturate(1.25); backdrop-filter: blur(22px) saturate(1.25); border: 1px solid rgba(217, 181, 110, .3); box-shadow: inset 0 1px 0 rgba(246, 241, 231, .14), 0 40px 80px -40px rgba(4, 22, 23, .7), 0 4px 14px -8px rgba(4, 22, 23, .4); scroll-margin-top: 100px; }
.finder::after { content: ""; position: absolute; left: clamp(22px, 3.6vw, 52px); bottom: -1px; width: 64px; height: 4px; border-radius: 2px 2px 0 0; background: var(--gold); }
.finder .sentence { font-family: var(--en); font-size: clamp(1.4rem, 2.4vw, 2.15rem); line-height: 1.55; max-width: 44ch; }
.pick { position: relative; display: inline-block; vertical-align: baseline; }
.pick select { appearance: none; -webkit-appearance: none; font: inherit; color: var(--gold-lt); background: transparent; border: 0; border-bottom: 2px solid var(--gold); border-radius: 0; padding: 0 1.05em 0 .12em; margin: 0 .05em; cursor: pointer; line-height: 1.25; max-width: 100%; transition: color .2s, border-color .2s; }
.pick select:hover { color: var(--parch); }
.pick select:focus-visible { outline-offset: 4px; }
.pick select option { color: var(--teal); background: var(--parch); font-family: var(--sm); font-size: 1rem; }
.pick::after { content: ""; position: absolute; right: .2em; top: 50%; width: .32em; height: .32em; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
.finder .go { margin-top: var(--sp-3); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.finder .go .quiet { color: var(--muted-teal); font-size: .98rem; }
.finder .go .quiet a { color: var(--parch); }

.arch-verse { position: relative; aspect-ratio: 5 / 8; border: 1.5px solid var(--gold-lt); border-radius: 999px 999px 0 0; background: var(--teal-2); display: grid; align-content: center; justify-items: center; gap: 18px; padding: 22% 12% 14%; text-align: center; color: var(--gold-lt); }
.arch-verse::after { content: ""; position: absolute; left: -9%; right: -9%; bottom: -10px; height: 10px; border-radius: 5px; background: var(--gold); }
.arch-verse .arsvg { width: 100%; height: auto; color: var(--parch); }
.arch-verse .tr { font-family: var(--en); font-size: clamp(1.2rem, 1.8vw, 1.5rem); color: var(--parch); line-height: 1.3; }
.arch-verse .ref { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 860px) {
  .stage-in { grid-template-columns: 1fr; align-items: start; }
  .arch-verse { display: none; }
  .scrim { background: linear-gradient(180deg, rgba(10, 47, 49, .62) 0%, rgba(10, 47, 49, .38) 26%, rgba(10, 47, 49, .76) 44%, rgba(10, 47, 49, .92) 100%); }
}

/* Results */
.results { padding-block: clamp(64px, 8vw, 104px) var(--sp-5); }
.results-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: var(--sp-4); }
.results-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.results-head .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 5vw, 64px); }
.plist-in { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.pcat.hide { display: none; }
.pcat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 22px 14px 14px; border-radius: 16px; background: var(--tint); }
.pcat-head .well { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--teal); flex: none; }
.pcat-head .ico { width: 32px; height: 32px; }
.pcat-head h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.pcat-head [lang="ar"] { font-size: 1.3rem; color: var(--gold-ink); }
.pcat-head .link-arrow { margin-left: auto; font-size: .95rem; }
.pcat .prog:first-child { border-top: 0; }
.tag.sub { background: var(--teal); color: var(--parch); border-color: var(--teal); }
.prog { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) auto; gap: 12px 40px; align-items: center; padding-block: 26px; border-top: 1px solid var(--line); }
.prog .name { display: grid; gap: 6px; justify-items: start; }
.prog .name [lang="ar"] { font-size: 1.15rem; color: var(--gold-ink); line-height: 1.4; }
.prog h4 { font-family: var(--en); font-weight: 400; margin: 0; line-height: 1.15; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.prog .desc { color: var(--muted); max-width: 58ch; }
.prog .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; color: var(--teal); background: var(--paper); white-space: nowrap; }
.prog .act { justify-self: end; }
.prog.hide { display: none; }
.prog.ink { animation: ink .7s var(--ease) both; }
@keyframes ink { from { opacity: 0; filter: blur(6px); transform: translateY(8px); } to { opacity: 1; filter: none; transform: none; } }
.empty { display: none; padding: 36px; border: 1px dashed var(--gold); border-radius: var(--r); background: var(--paper); }
.empty.show { display: grid; gap: 14px; justify-items: start; }
.empty h3 { font-size: 1.5rem; }
@media (max-width: 860px) {
  .prog { grid-template-columns: 1fr; }
  .prog .act { justify-self: start; }
}

/* Section heads */
.sec { padding-block: var(--sp-6); position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); }
.sec-head .rule { margin-top: 22px; }
.sec-head p { color: var(--muted); font-size: 1.125rem; max-width: 54ch; }
.on-teal .sec-head p { color: var(--muted-teal); }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }

/* Path of learning */
.path { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.path::before, .path::after { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 2px; margin-left: -1px; background: var(--line); }
.path::after { background: var(--gold); transform-origin: top; transform: scaleY(var(--p, 0)); }
.step { position: relative; display: grid; grid-template-columns: 1fr 56px 1fr; align-items: start; padding-block: 18px; }
.step .node { grid-column: 2; justify-self: center; margin-top: 12px; width: 14px; height: 14px; transform: rotate(45deg); background: var(--parch); border: 2px solid var(--gold); transition: background-color .4s var(--ease); z-index: 1; }
.step.lit .node { background: var(--gold); }
.step .body { display: grid; gap: 6px; max-width: 40ch; text-align: left; }
.step .body [lang="ar"] { text-align: inherit; }
.step:nth-child(odd) .body { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
.step:nth-child(even) .body { grid-column: 3; grid-row: 1; }
.step [lang="ar"] { font-size: 1.35rem; color: var(--gold-ink); line-height: 1.3; }
.step h3 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); }
.step p { color: var(--muted); }
@media (max-width: 760px) {
  .path::before, .path::after { left: 7px; }
  .step { grid-template-columns: 32px 1fr; }
  .step .node { grid-column: 1; justify-self: start; margin-left: 1px; }
  .step:nth-child(odd) .body, .step:nth-child(even) .body { grid-column: 2; justify-self: start; text-align: left; }
}

/* Who it is for: arch panels */
.arches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: stretch; }
.archp { position: relative; border-radius: 999px 999px var(--r) var(--r); padding: clamp(84px, 10vw, 128px) clamp(24px, 3vw, 40px) clamp(28px, 3vw, 40px); display: grid; align-content: start; gap: 14px; }
.archp.t { background: var(--teal); color: var(--parch); }
.archp.t p { color: var(--muted-teal); }
.archp.p { background: var(--paper); border: 1px solid var(--line); }
.archp.p p { color: var(--muted); }
.archp .mk { position: absolute; top: 28px; left: 50%; width: 40px; transform: translateX(-50%); }
.archp h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); text-align: center; }
.archp [lang="ar"] { text-align: center; font-size: 1.2rem; color: var(--gold-lt); }
.archp.p [lang="ar"] { color: var(--gold-ink); }
.archp ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.archp li { display: flex; gap: 12px; align-items: baseline; }
.archp li .dot { transform: translateY(-2px) rotate(45deg); }
.archp .btn { margin-top: 14px; justify-self: start; }
@media (max-width: 900px) { .arches { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* Two ways to learn */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-teal); border-bottom: 1px solid var(--line-teal); }
.way { padding: clamp(32px, 5vw, 64px) clamp(0px, 4vw, 56px) clamp(32px, 5vw, 64px) 0; display: grid; gap: 16px; align-content: start; }
.way + .way { border-left: 1px solid var(--line-teal); padding-left: clamp(24px, 4vw, 56px); padding-right: 0; }
.way h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.way p { color: var(--muted-teal); max-width: 44ch; }
.way .facts { display: grid; gap: 10px; margin-top: 8px; }
.way .facts div { display: flex; gap: 12px; align-items: baseline; }
.way .facts .dot { transform: translateY(-2px) rotate(45deg); }
.way svg.ic { width: 40px; height: 40px; color: var(--gold-lt); }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } .way { padding-inline: 0 !important; } .way + .way { border-left: 0; border-top: 1px solid var(--line-teal); } }

/* Ijazah band */
.sanad { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.sanad h2 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); }
.sanad .copy { display: grid; gap: 18px; }
.sanad .copy p { color: var(--muted); max-width: 56ch; font-size: 1.125rem; }
.chain { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.chain li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding-block: 14px; align-items: center; }
.chain li::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.chain li:first-child::before { top: 50%; }
.chain li:last-child::before { bottom: 50%; }
.chain .k { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; }
.chain .k i { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid var(--gold); background: var(--parch); }
.chain li.you .k i { background: var(--gold); }
.chain b { font-family: var(--en); font-weight: 400; font-size: 1.25rem; }
.chain span { color: var(--muted); font-size: .95rem; display: block; }
.chain li.top b { color: var(--gold-ink); }
@media (max-width: 860px) { .sanad { grid-template-columns: 1fr; } }

/* Welcome letter */

/* Close / enquire */
.close { position: relative; overflow: hidden; }
.close .in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; padding-block: var(--sp-6); }
.close h2 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
.close .lede { color: var(--muted-teal); margin-top: 18px; max-width: 44ch; font-size: 1.125rem; }
.routes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.route { display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center; padding: 18px 22px; border-radius: var(--r); border: 1px solid var(--line-teal); text-decoration: none; transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.route:hover { background: rgba(217, 181, 110, .1); border-color: var(--gold); }
.route .ic { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: var(--teal-2); color: var(--gold-lt); }
.route .ic svg { width: 22px; height: 22px; }
.route b { font-family: var(--en); font-weight: 400; font-size: 1.3rem; display: block; line-height: 1.2; }
.route span { color: var(--muted-teal); font-size: .95rem; }
.route .arr { width: 20px; height: 20px; color: var(--gold-lt); }
.route.primary { background: var(--gold); border-color: var(--gold); color: var(--teal-3); }
.route.primary span { color: var(--teal-3); }
.route.primary .ic { background: var(--teal); color: var(--gold-lt); }
.route.primary .arr { color: var(--teal); }
.route.primary:hover { background: var(--gold-lt); }
@media (max-width: 860px) { .close .in { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { background: var(--teal-3); color: var(--parch); padding-block: 64px 32px; --m-arch: var(--parch); --m-pen: var(--teal-3); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand { display: grid; gap: 16px; align-content: start; }
.foot-brand .row { display: flex; align-items: center; gap: 16px; }
.foot-brand .mark { width: 44px; height: 53px; }
.foot-brand .arsvg { height: 26px; }
.foot-brand .en { font-family: var(--en); letter-spacing: .2em; text-transform: uppercase; font-size: 1.05rem; line-height: 1.2; }
.foot-brand .kt { color: var(--gold-lt); letter-spacing: .5em; font-family: var(--en); font-size: .72rem; text-transform: uppercase; }
.foot-brand p { color: var(--muted-teal); max-width: 36ch; font-size: .95rem; }
.site-foot h4 { font-family: var(--sm); font-weight: 500; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-lt); margin-bottom: 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .98rem; }
.site-foot a { text-decoration: none; color: var(--parch); }
.site-foot a:hover { text-decoration: underline; }
.site-foot address { font-style: normal; color: var(--muted-teal); line-height: 1.7; font-size: .98rem; }
.foot-base { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-teal); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted-teal); font-size: .88rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* Inner page hero */
.page-hero { position: relative; overflow: hidden; padding-top: 96px; background: linear-gradient(180deg, var(--teal-2) 0%, var(--teal) 50%, var(--teal-3) 100%); }
.page-hero .in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 64px; align-items: end; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.page-hero h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); max-width: 16ch; }
.page-hero p { margin-top: 20px; color: var(--muted-teal); max-width: 52ch; font-size: 1.15rem; }
.page-hero .rule { margin-top: 28px; }
.page-hero .ar-big { font-size: clamp(2.6rem, 6vw, 5.2rem); color: var(--gold-lt); line-height: 1.2; }
@media (max-width: 760px) { .page-hero .in { grid-template-columns: 1fr; } }

/* Programmes page */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.chip { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--teal); font: 500 .95rem/1 var(--sm); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--teal); color: var(--parch); border-color: var(--teal); }
.pdetail { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px 64px; padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.pdetail.hide { display: none; }
.pdetail .side { display: grid; gap: 10px; align-content: start; justify-items: start; }
.pdetail .side [lang="ar"] { font-size: 1.6rem; color: var(--gold-ink); line-height: 1.3; }
.pdetail h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.pdetail .side [lang="ar"] { font-size: 1.35rem; }
.cat { padding-top: clamp(48px, 6vw, 88px); scroll-margin-top: 80px; }
.cat:first-of-type { padding-top: 0; }
.cat.hide { display: none; }
.cat-head { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 12px 64px; align-items: end; padding: 32px clamp(20px, 3vw, 40px); background: var(--teal); color: var(--parch); border-radius: var(--r); }
.cat-head [lang="ar"] { display: block; font-size: 1.5rem; color: var(--gold-lt); margin-bottom: 4px; }
.cat-head h2 { font-size: clamp(2.2rem, 4vw, 3.25rem); }
.cat-head p { color: var(--muted-teal); max-width: 56ch; font-size: 1.1rem; }
.cat-head + .pdetail { border-top: 0; }
.cat-index { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.cat-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 28px; }
.cat-index a { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 14px 18px 14px 14px; border: 1px solid transparent; border-radius: 16px; background: var(--tint); text-decoration: none; font-family: var(--en); font-size: 1.2rem; line-height: 1.2; transition: border-color .2s, transform .3s var(--ease); }
.cat-index .well { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); flex: none; }
.cat-index .ico { width: 28px; height: 28px; }
.cat-index .t { display: grid; gap: 2px; }
.cat-index a:hover { transform: translateY(-2px); }
.cat-index a:hover { border-color: var(--gold); }
.cat-index [lang="ar"] { font-size: .95rem; color: var(--gold-ink); justify-self: start; }
.subs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lbl-sm { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 500; margin-right: 6px; }
.subs .tag { background: var(--teal); color: var(--parch); border-color: var(--teal); font-size: .9rem; padding: 4px 14px; }
@media (max-width: 860px) { .cat-head { grid-template-columns: 1fr; } }
.pdetail .main { display: grid; gap: 22px; }
.pdetail .main > p { font-size: 1.125rem; max-width: 62ch; }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.facts-grid div { border-top: 1px solid var(--line); padding-top: 12px; }
.facts-grid dt { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 500; }
.facts-grid dd { margin: 4px 0 0; }
.todo { display: flex; gap: 12px; align-items: baseline; padding: 14px 18px; background: var(--parch-2); border-radius: var(--r); font-size: .95rem; color: var(--muted); }
.todo .dot { transform: translateY(-2px) rotate(45deg); }
@media (max-width: 860px) { .pdetail { grid-template-columns: 1fr; } .facts-grid { grid-template-columns: 1fr; gap: 12px; } }

/* About */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.story .copy { display: grid; gap: 20px; font-size: 1.125rem; max-width: 60ch; }
.story .copy h2 { font-size: clamp(2.1rem, 4vw, 3.25rem); }
.meanings { display: grid; gap: 0; }
.meaning { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding-block: 20px; border-top: 1px solid var(--line); }
.meaning svg { width: 64px; height: 64px; }
.meaning b { font-family: var(--en); font-weight: 400; font-size: 1.3rem; display: block; }
.meaning p { color: var(--muted); }
.photo-slot { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r) var(--r); border: 1.5px dashed var(--gold); background: var(--paper); display: grid; place-items: center; text-align: center; padding: 20%; color: var(--muted); font-size: .95rem; }
.faq { max-width: 880px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 22px; font-family: var(--en); font-size: clamp(1.2rem, 2vw, 1.5rem); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 22px; height: 22px; flex: none; color: var(--gold); transition: transform .3s var(--ease); }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .ans { padding-bottom: 24px; color: var(--muted); max-width: 64ch; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

/* Enrol form */
.enrol { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.form { display: grid; gap: 22px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 22px; }
.form legend { font-family: var(--en); font-size: 1.6rem; margin-bottom: 6px; padding: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .field .lbl { font-weight: 500; font-size: .98rem; }
.field .hint { font-size: .88rem; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; color: var(--teal); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; min-height: 50px; width: 100%; caret-color: var(--gold-ink); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23C8963E' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--gold); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(200, 150, 62, .35); }
.field input::placeholder, .field textarea::placeholder { color: #5E6B66; }
.field[data-invalid] input, .field[data-invalid] select, .field[data-invalid] textarea { border-color: #A23B2A; }
.field .err { display: none; color: #8E2F20; font-size: .9rem; font-weight: 500; }
.field[data-invalid] .err { display: block; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; }
.choices span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 400; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.choices input:hover + span { border-color: var(--gold); }
.choices input:checked + span { background: var(--teal); color: var(--parch); border-color: var(--teal); }
.choices input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.form .submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form .note { font-size: .9rem; color: var(--muted); max-width: 46ch; }
.status { display: none; padding: 18px 20px; border-radius: var(--r); font-size: 1rem; }
.status.show { display: block; }
.status.ok { background: var(--teal); color: var(--parch); }
.status.bad { background: #F7E4DF; color: #7A2A1C; border: 1px solid #E0B6AB; }
.aside { display: grid; gap: 16px; position: sticky; top: 96px; }
.aside .card { background: var(--teal); color: var(--parch); border-radius: var(--r); padding: 28px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.aside .card h2 { font-size: 1.6rem; position: relative; }
.aside .card p, .aside .card address { color: var(--muted-teal); font-style: normal; position: relative; }
.aside .card .btn { justify-self: start; position: relative; }
.aside .plain { border: 1px solid var(--line); border-radius: var(--r); padding: 24px 28px; display: grid; gap: 10px; background: var(--paper); }
.aside .plain h2 { font-size: 1.35rem; }
.aside .plain a { font-weight: 500; }
@media (max-width: 900px) { .enrol { grid-template-columns: 1fr; } .aside { position: static; } }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; padding: 120px 16px; }
.lost .mark { width: 110px; margin: 0 auto 28px; }
.lost h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.lost p { color: var(--muted-teal); margin: 16px auto 32px; max-width: 42ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .site-head, .menu-btn, .vid-btn, .close, .site-foot { display: none; } body { background: #fff; } }
.menu-btn .i-shut, .nav-open .menu-btn .i-open { display: none; }
.nav-open .menu-btn .i-shut { display: block; }

/* Landing pages */
.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.land-hero h1 { max-width: 14ch; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-teal); }
.trio-item { display: grid; gap: 10px; align-content: start; padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px) 8px 0; }
.trio-item + .trio-item { border-left: 1px solid var(--line-teal); padding-left: clamp(20px, 3vw, 40px); }
.trio-item [lang="ar"] { font-size: 1.6rem; color: var(--gold-lt); line-height: 1.3; justify-self: start; }
.trio-item h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
.trio-item p { color: var(--muted-teal); max-width: 38ch; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } .trio-item, .trio-item + .trio-item { padding: 28px 0 8px; border-left: 0; } .trio-item + .trio-item { border-top: 1px solid var(--line-teal); } }
.cat-intro { display: grid; gap: 14px; justify-items: start; }
.link-arrow.on-dark { color: var(--parch); }
.facts-grid.stack { grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.prep { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.prep a { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "ic ar arr" "ic b arr" "ic s arr"; gap: 2px 18px; align-items: center; padding: 20px 24px; border: 1px solid transparent; border-radius: 16px; background: var(--tint); text-decoration: none; transition: border-color .2s, background-color .2s; }
.prep a:hover { border-color: var(--gold); }
.prep [lang="ar"] { grid-area: ar; color: var(--gold-ink); justify-self: start; }
.prep b { grid-area: b; font-family: var(--en); font-weight: 400; font-size: 1.35rem; }
.prep span:not([lang]) { grid-area: s; color: var(--muted); font-size: .95rem; }
.prep .arr { grid-area: arr; width: 20px; height: 20px; color: var(--gold-ink); }

/* ---- Colour: programme tints ---- */
.tint-sage { --tint: var(--sage); }
.tint-sand { --tint: var(--sand); }
.tint-mist { --tint: var(--mist); }
.tint-stone { --tint: var(--stone); }
.prep .ico { grid-area: ic; width: 40px; height: 40px; color: var(--teal); }
.cat-ico { position: absolute; top: 26px; right: clamp(20px, 3vw, 40px); width: 44px; height: 44px; color: var(--gold-lt); }

/* ---- Paper grain over every surface ---- */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .2  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---- Landing pages: arch photo and tonal rooms ---- */
.land-hero .in { grid-template-columns: minmax(0, 1fr) minmax(220px, 330px); align-items: center; }
.land-hero .ar-big { display: block; text-align: left; font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: 10px; }
.arch-photo { position: relative; margin: 0 0 10px; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; border: 1.5px solid var(--gold-lt); overflow: hidden; background: var(--teal-2); transition: transform .5s var(--ease); }
.arch-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--gold); }
.arch-photo .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch-photo .ph-note { position: absolute; left: 50%; right: auto; top: auto; bottom: 28px; transform: translateX(-50%); width: max-content; max-width: 86%; border-radius: 12px; font-size: .78rem; line-height: 1.4; }
.arch-photo .badge { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); width: 76px; height: 76px; border-radius: 999px; display: grid; place-items: center; color: var(--gold-lt); background: rgba(10, 47, 49, .5); border: 1px solid rgba(217, 181, 110, .4); }
.arch-photo .badge .ico { width: 42px; height: 42px; }
.arch-photo:has(img) .badge { display: none; }
@media (max-width: 760px) { .land-hero .in { grid-template-columns: 1fr; } .arch-photo { max-width: 260px; } }

.room-alim .page-hero h1 { color: var(--gold-lt); }
.room-alim .page-hero .rule, .room-alim .arch-photo { box-shadow: 0 0 0 6px rgba(200, 150, 62, .12); }
.room-alim .arch-photo { border-width: 2px; border-color: var(--gold); }


/* ---- Sanad chain lights link by link ---- */
.chain li::after { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--gold); transform-origin: top; transform: scaleY(0); transition: transform .5s var(--ease); }
.chain li:first-child::after { top: 50%; }
.chain li:last-child::after { bottom: 50%; }
.chain li.lit::after { transform: scaleY(1); }
.chain .k i { transition: background-color .4s var(--ease), transform .4s var(--ease); }
.js .chain li.you .k i { background: var(--parch); }
.chain li.lit .k i { background: var(--gold); transform: rotate(45deg) scale(1.15); }
.js .chain li { transition: opacity .5s var(--ease); }
.js .chain li:not(.lit) div { opacity: .55; transition: opacity .5s var(--ease); }

/* ---- Pointer tilt ---- */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); will-change: transform; }
[data-tilt].tilting { transition: transform .12s linear; }

@media (prefers-reduced-motion: reduce) {
  .pat-front { transform: none !important; }
  [data-tilt] { transform: none !important; }
}
/* Gold Ink deepens on tinted tiles so Arabic labels keep 4.5:1 */
[class*="tint-"] [lang="ar"] { color: var(--gold-ink-deep); }

/* ---- Programme colour profiles ----
   Teal, parchment and gold stay the house colours (menu, close, footer, buttons).
   Each area adds one colour of its own, taken from the things it is taught with:
   Qur'an: mushaf green. Arabic: reed and red ink. Islamic Studies: lapis. Alimiyyah: oxblood binding.
   Kids: saffron. Counselling: dusk. */
:root {
  --quran: #17452F; --quran-2: #0D2F20; --quran-tint: #E1EBDF;
  --arabic: #7A3319; --arabic-2: #561F0B; --arabic-tint: #F4E3D8;
  --studies: #1F3A66; --studies-2: #142848; --studies-tint: #E0E6F1;
  --alim: #561B2A; --alim-2: #380E19; --alim-tint: #F1E0DF;
  --kids: #F6CF72; --kids-2: #EFB743; --kids-tint: #FBEBC4; --kids-ink: #6B3F06;
  --care: #463F66; --care-2: #302A4C; --care-tint: #E7E4F0; --care-light: #ECE9F3; --care-light-2: #DED9EC;
}
.tint-quran { --tint: var(--quran-tint); --tint-deep: var(--quran); }
.tint-arabic { --tint: var(--arabic-tint); --tint-deep: var(--arabic); }
.tint-studies { --tint: var(--studies-tint); --tint-deep: var(--studies); }
.tint-alim { --tint: var(--alim-tint); --tint-deep: var(--alim); }
.tint-kids { --tint: var(--kids-tint); --tint-deep: var(--kids-ink); }
.tint-care { --tint: var(--care-tint); --tint-deep: var(--care); }

/* Tiles, wells and category bands take their area's colour */
.pcat-head .well, .cat-index .well, .dd-item .well, .prep .ico { color: var(--tint-deep, var(--teal)); }
.pcat-head .well, .cat-index .well { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint-deep, var(--teal)) 18%, transparent); }
.pcat-head h3, .cat-index a, .prep b, .dd-item b { color: var(--tint-deep, var(--teal)); }
.dd-item:hover .well { background: var(--tint-deep, var(--teal)); color: var(--gold-lt); }
.cat-head[class*="tint-"] { background: radial-gradient(70% 120% at 100% 0%, rgba(217, 181, 110, .16), transparent 60%), linear-gradient(180deg, var(--tint-deep), color-mix(in srgb, var(--tint-deep) 78%, #000)); }
.cat-head[class*="tint-"] [lang="ar"] { color: var(--gold-lt); }

/* Rooms: each landing page is lit in its own colour */
.room-quran { --pg: var(--quran); --pg-2: var(--quran-2); }
.room-arabic { --pg: var(--arabic); --pg-2: var(--arabic-2); }
.room-studies { --pg: var(--studies); --pg-2: var(--studies-2); }
.room-alim { --pg: var(--alim); --pg-2: var(--alim-2); }
.room-kids { --pg: var(--teal); --pg-2: var(--teal-3); }
.room-care { --pg: var(--care); --pg-2: var(--care-2); }
[class*="room-"] .land-hero.on-teal { background: radial-gradient(70% 60% at 85% 8%, rgba(217, 181, 110, .18), transparent 70%), linear-gradient(180deg, var(--pg) 0%, var(--pg-2) 100%); }
[class*="room-"] main > .sec.on-teal { background: radial-gradient(60% 80% at 100% 0%, rgba(217, 181, 110, .1), transparent 70%), var(--pg); }
[class*="room-"] .arch-photo { background: var(--pg-2); }
.room-alim .arch-photo { border-width: 2px; border-color: var(--gold); box-shadow: 0 0 0 6px rgba(200, 150, 62, .12); }

/* Kids: a saffron room, teal ink */
.room-kids .land-hero { background: radial-gradient(55% 70% at 86% 12%, rgba(255, 250, 235, .45), transparent 70%), linear-gradient(180deg, var(--kids) 0%, var(--kids-2) 100%); color: var(--teal); }
.room-kids .land-hero p { color: #3E4A40; }
.room-kids .land-hero .ar-big { color: var(--kids-ink); }
.room-kids .land-hero .rule, .room-kids .land-hero .arch-photo::after { background: var(--teal); }
.room-kids .land-hero .arch-photo { border-color: var(--teal); }
.room-kids .land-hero .btn-gold { background: var(--teal); color: var(--parch); }
.room-kids .land-hero .btn-gold:hover { background: var(--teal-2); }
.room-kids .land-hero .btn-line:hover { background: rgba(14, 61, 63, .08); border-color: var(--teal); }
.room-kids .pat-front { filter: brightness(.42) saturate(1.4); opacity: .3; }

/* Counselling: a quiet dusk room */
.room-care .land-hero { background: radial-gradient(60% 70% at 85% 10%, rgba(255, 255, 255, .55), transparent 70%), linear-gradient(180deg, var(--care-light) 0%, var(--care-light-2) 100%); color: var(--care); }
.room-care .land-hero p { color: #4F4A68; }
.room-care .land-hero .ar-big { color: var(--care); }
.room-care .land-hero .btn-line:hover { background: rgba(70, 63, 102, .08); border-color: var(--care); }
.room-care .land-hero .arch-photo { border-color: var(--care); background: linear-gradient(180deg, var(--care), var(--care-2)); }
.room-care .pat-front { filter: brightness(.6) saturate(.8) hue-rotate(200deg); opacity: .32; }
.arch-photo .badge.big { top: 50%; transform: translate(-50%, -60%); width: 128px; height: 128px; display: grid; }
.arch-photo .badge.big .ico { width: 68px; height: 68px; }
.arch-photo .badge.big + .badge { display: none; }
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.area { display: grid; gap: 8px; align-content: start; padding: 28px clamp(20px, 2.4vw, 32px) 32px; border-radius: 16px; background: var(--tint); }
.area .well { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--care); margin-bottom: 10px; box-shadow: inset 0 0 0 1px rgba(70, 63, 102, .16); }
.area .ico { width: 34px; height: 34px; }
.area [lang="ar"] { font-size: 1.2rem; justify-self: start; }
.area h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); color: var(--care); }
.area p { color: var(--muted); }
@media (max-width: 760px) { .areas { grid-template-columns: 1fr; } }
.safe { padding: 22px 24px; border-radius: 16px; border: 1px solid rgba(217, 181, 110, .45); background: rgba(246, 241, 231, .06); }
.safe b { display: block; font-family: var(--en); font-weight: 400; font-size: 1.35rem; color: var(--gold-lt); margin-bottom: 6px; }
.safe p { color: var(--muted-teal); }
.safe a { color: var(--parch); font-weight: 500; white-space: nowrap; }
.ask-care .copy + .copy { display: grid; gap: 16px; align-content: start; }
.ask-care .todo { background: rgba(246, 241, 231, .9); color: #4F4A68; }

/* Title card video */
.arch-photo video.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch-photo:has(video) .badge { display: none; }
.arch-vid { top: auto; right: 16px; bottom: 26px; width: 40px; height: 40px; border-color: rgba(246, 241, 231, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.arch-vid svg { width: 16px; height: 16px; }

/* Tags: one colour for each kind, one icon for each tag */
.tag { gap: 6px; padding: 3px 11px 3px 8px; border-color: color-mix(in srgb, currentColor 16%, transparent); }
.tag .ti { width: 15px; height: 15px; flex: none; }
.tag-who { background: #E3EDF2; color: #1F4A5E; }
.tag-level { background: #F3E8CF; color: #6B4A0E; }
.tag-format { background: #EAE5F2; color: #4A3F6B; }
.tag-where { background: #E1ECE4; color: #22503A; }
.tag-award { background: #F5E2C6; color: #7A4A12; }
/* On the light rooms the menu bar needs a solid teal glass to keep its text readable */
.room-kids .bar::before, .room-care .bar::before { background: rgba(10, 47, 49, .88); }
.ask-care .copy p { color: var(--muted-teal); }
.ask-care .copy .todo { color: #4F4A68; }
@media (max-width: 940px) { .dd-item b { color: var(--parch); } }

/* ---- Arch pattern: a faint watermark, so the words in front of it read first ---- */
.pat { opacity: .45; }

/* ---- Title cards: the photo or video fills the card behind a veil in the room's colour ---- */
.land-hero.has-media { display: grid; align-items: end; padding-top: 0; min-height: clamp(560px, 82vh, 800px); background: var(--pg-2, var(--teal-3)); }
.land-hero.has-media .in { grid-template-columns: minmax(0, 1fr); width: 100%; padding-block: clamp(128px, 14vw, 180px) clamp(56px, 7vw, 104px); }
.land-hero.has-media .hero-copy { max-width: 680px; }
.land-hero.has-media p { color: var(--parch-2); }
.land-hero.has-media .vid-btn { top: 100px; }
.land-hero .scrim {
  --edge: calc(max(var(--gutter), 50% - 620px) + 640px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pg-2) 95%, transparent) 0%, color-mix(in srgb, var(--pg) 91%, transparent) var(--edge), color-mix(in srgb, var(--pg) 42%, transparent) calc(var(--edge) + 300px), color-mix(in srgb, var(--pg) 16%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--pg-2) 60%, transparent) 0%, transparent 26%, transparent 72%, color-mix(in srgb, var(--pg-2) 55%, transparent) 100%);
}
.room-kids .land-hero .scrim {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--kids) 96%, transparent) 0%, color-mix(in srgb, var(--kids) 93%, transparent) var(--edge), color-mix(in srgb, var(--kids) 40%, transparent) calc(var(--edge) + 300px), color-mix(in srgb, var(--kids) 12%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--kids-2) 50%, transparent) 0%, transparent 26%);
}
.room-kids .land-hero.has-media { background: var(--kids); }
.room-kids .land-hero.has-media p { color: #33402F; }
/* Kids: the running children sit just right of the copy, so the photo starts where the text ends
   and the veil clears quickly instead of covering the left half. */
@media (min-width: 761px) {
  .room-kids .land-hero.has-media { --copy: 470px; --edge: calc(max(var(--gutter), 50% - 620px) + var(--copy)); }
  .room-kids .land-hero.has-media .hero-copy { max-width: var(--copy); }
  .room-kids .land-hero .media-wrap { left: calc(var(--edge) - 40px); }
  .room-kids .land-hero .media-wrap .media { object-position: 38% 60%; }
  .room-kids .land-hero .scrim {
    --edge: inherit;
    background:
      linear-gradient(90deg, var(--kids) 0%, color-mix(in srgb, var(--kids) 94%, transparent) var(--edge), color-mix(in srgb, var(--kids) 30%, transparent) calc(var(--edge) + 160px), transparent calc(var(--edge) + 300px)),
      linear-gradient(180deg, color-mix(in srgb, var(--kids-2) 50%, transparent) 0%, transparent 26%);
  }
}
.room-care .land-hero .scrim {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--care-light) 96%, transparent) 0%, color-mix(in srgb, var(--care-light) 93%, transparent) var(--edge), color-mix(in srgb, var(--care-light) 40%, transparent) calc(var(--edge) + 300px), color-mix(in srgb, var(--care-light) 10%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--care-light-2) 50%, transparent) 0%, transparent 26%);
}
.room-care .land-hero.has-media { background: var(--care-light); }
.room-care .land-hero.has-media p { color: #4F4A68; }
@media (max-width: 760px) {
  .land-hero.has-media { min-height: 0; }
  .land-hero.has-media .in { padding-block: 132px 56px; }
  .land-hero .scrim { background: linear-gradient(180deg, color-mix(in srgb, var(--pg-2) 84%, transparent) 0%, color-mix(in srgb, var(--pg) 90%, transparent) 30%, color-mix(in srgb, var(--pg-2) 94%, transparent) 100%); }
  .room-kids .land-hero .scrim { background: linear-gradient(180deg, color-mix(in srgb, var(--kids) 86%, transparent) 0%, color-mix(in srgb, var(--kids) 93%, transparent) 30%, color-mix(in srgb, var(--kids-2) 96%, transparent) 100%); }
  .room-care .land-hero .scrim { background: linear-gradient(180deg, color-mix(in srgb, var(--care-light) 86%, transparent) 0%, color-mix(in srgb, var(--care-light) 93%, transparent) 30%, color-mix(in srgb, var(--care-light-2) 96%, transparent) 100%); }
  .land-hero.has-media .vid-btn { top: 88px; }
}
