:root {
    --bg: #f7f8f4;
    --bg-deep: #061f18;
    --surface: #ffffff;
    --surface-soft: #eef2ea;
    --surface-warm: #fbf6eb;
    --text: #17211d;
    --muted: #5b6861;
    --primary: #083f31;
    --primary-2: #12604b;
    --gold: #c99a2e;
    --clay: #8b4f3c;
    --border: rgba(8, 63, 49, .14);
    --shadow: 0 26px 70px rgba(6, 31, 24, .16);
    --max: 1180px;
}

* { box-sizing: border-box; }

html {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, #f7f8f4 0%, #f4f6f0 42%, #fff 100%);
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.icon,
.arrow-icon {
    display: inline-block;
    color: currentColor;
    line-height: 1;
}

.icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-warm);
    color: var(--primary);
}

.icon::before,
.arrow-icon::before {
    content: "";
    display: block;
    background: currentColor;
    mask: var(--icon-mask) center / contain no-repeat;
}

.icon::before {
    width: 23px;
    height: 23px;
}

.arrow-icon::before {
    width: 18px;
    height: 18px;
}

.icon-book {
    --icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v16H7a3 3 0 0 0-3 3V5.5Zm0 0V22m4-15h8M8 11h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.icon-sun {
    --icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5V3m0 18v-2M5 12H3m18 0h-2M6.3 6.3 4.9 4.9m14.2 14.2-1.4-1.4m0-11.4 1.4-1.4M4.9 19.1l1.4-1.4M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.icon-hand {
    --icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m8 12 2.2-2.2a2 2 0 0 1 2.8 0L15 12m-7 0-3-3a2 2 0 0 1 2.8-2.8L10 8.4M8 12l4 4a2.8 2.8 0 0 0 4 0l3-3a2 2 0 0 0-2.8-2.8L15 11.4M15 12l1.2-1.2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.arrow-icon {
    --icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h13m-5-5 5 5-5 5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(247, 248, 244, .9);
    border-bottom: 1px solid rgba(8, 63, 49, .1);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: var(--max);
    min-height: 78px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-grid;
    gap: 2px;
    color: var(--primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.05;
}

.brand em {
    color: var(--gold);
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.site-header .brand {
    flex: 0 0 auto;
    max-width: 210px;
}

.site-header .brand span,
.site-header .brand em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links > a,
.more-toggle {
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.nav-links > a::after,
.more-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.nav-links > a:hover,
.more-menu.is-open .more-toggle,
.more-toggle:hover {
    color: var(--primary);
}

.nav-links > a:hover::after,
.more-menu.is-open .more-toggle::after,
.more-toggle:hover::after {
    transform: scaleX(1);
}

.more-menu {
    position: relative;
}

.more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.more-chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
}

.more-menu.is-open .more-chevron {
    transform: translateY(2px) rotate(225deg);
}

.more-panel {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    width: min(1060px, calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 110px));
    overflow: auto;
    padding: 22px;
    border: 1px solid rgba(8, 63, 49, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 30px 80px rgba(6, 31, 24, .2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}

.more-menu.is-open .more-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.more-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 26px;
    text-transform: none;
}

.more-group {
    min-width: 0;
}

.more-group-wide {
    grid-column: span 2;
}

.more-group-full {
    grid-column: 1 / -1;
}

.more-group h2 {
    margin: 0 0 9px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.more-group-links {
    display: grid;
    gap: 6px 14px;
}

.more-group-wide .more-group-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.more-group-full .more-group-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.more-group a {
    display: block;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
    transition: background .18s ease, color .18s ease;
}

.more-group a:hover {
    background: var(--surface-warm);
    color: var(--primary-2);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.nav-cta,
.button-primary {
    background: var(--primary);
    color: #fff;
    padding: 13px 22px;
    box-shadow: 0 14px 28px rgba(8, 63, 49, .16);
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, .32);
    color: #fff;
    padding: 13px 21px;
}

.nav-cta:hover,
.button-primary:hover {
    background: var(--primary-2);
    transform: translateY(-2px);
}

.button-secondary:hover {
    border-color: rgba(255, 255, 255, .7);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 7px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary);
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 16%, rgba(201, 154, 46, .24), transparent 30%),
        radial-gradient(circle at 8% 72%, rgba(139, 79, 60, .18), transparent 28%),
        linear-gradient(135deg, #06271e 0%, #0b3e31 52%, #071a15 100%);
    color: #fff;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M48 8l12 28 28 12-28 12-12 28-12-28L8 48l28-12z' fill='none' stroke='%23c99a2e' stroke-opacity='.18' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 48px 48px, 48px 48px, 96px 96px;
    opacity: .28;
}

.hero-shell {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    min-height: calc(100vh - 78px);
    margin: 0 auto;
    padding: 92px 24px 104px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: 70px;
}

.section-label {
    margin: 0 0 16px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero h1,
.intro-band h2,
.section-heading h2,
.quran-panel h2,
.page-hero h1,
.page-body h2,
.page-body h3 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.06;
}

.hero h1 {
    max-width: 720px;
    color: #fff;
    font-size: clamp(48px, 7vw, 86px);
}

.hero-content > p:not(.section-label) {
    max-width: 650px;
    margin: 28px 0 34px;
    color: rgba(255, 255, 255, .78);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.42;
    overflow-wrap: break-word;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-visual {
    position: relative;
    min-height: auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
    box-shadow: 0 32px 90px rgba(0, 0, 0, .28);
    min-width: 0;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: -18px 28px auto auto;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(201, 154, 46, .48);
    transform: rotate(45deg);
}

.hero-arch {
    display: block;
    width: 100%;
    height: 518px;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    object-fit: cover;
    object-position: center;
}

.hero-note {
    position: relative;
    left: auto;
    bottom: auto;
    max-width: none;
    margin-top: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(201, 154, 46, .34);
    border-radius: 8px;
    background: rgba(251, 246, 235, .94);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.hero-note span {
    display: block;
    color: var(--clay);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero-note strong {
    display: block;
    margin-top: 6px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    line-height: 1.15;
}

.pathways {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: -58px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.pathway-card {
    min-height: 172px;
    padding: 28px;
    border: 1px solid rgba(8, 63, 49, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 50px rgba(8, 63, 49, .12);
    transition: transform .2s ease, border-color .2s ease;
}

.pathway-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 154, 46, .54);
}

.pathway-card > span:not(.icon) {
    display: block;
    margin-top: 20px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pathway-card strong {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    line-height: 1.18;
}

.intro-band {
    position: relative;
    padding: 132px 24px 116px;
}

.intro-shell {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 70px;
    align-items: center;
}

.intro-mark {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(201, 154, 46, .42);
    background:
        radial-gradient(circle, rgba(201, 154, 46, .16), transparent 58%),
        url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23083f31' stroke-opacity='.22' stroke-width='1.4'%3E%3Cpath d='M90 10l20 60 60 20-60 20-20 60-20-60-60-20 60-20z'/%3E%3Cpath d='M90 34l14 42 42 14-42 14-14 42-14-42-42-14 42-14z'/%3E%3Ccircle cx='90' cy='90' r='72'/%3E%3Ccircle cx='90' cy='90' r='38'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
}

.intro-band h2 {
    max-width: 760px;
    color: var(--primary);
    font-size: clamp(34px, 5vw, 58px);
}

.intro-band p:not(.section-label) {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 110px 24px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 44px;
    margin-bottom: 46px;
}

.section-heading h2 {
    color: var(--primary);
    font-size: clamp(34px, 4vw, 50px);
}

.section-heading p {
    max-width: 650px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.text-link,
.section-heading a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.text-link .arrow-icon {
    color: var(--gold);
}

.silsila-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.person-card {
    position: relative;
    min-height: 268px;
    overflow: hidden;
    border: 1px solid rgba(8, 63, 49, .12);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,246,235,.78));
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.person-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 128px;
    height: 128px;
    border: 1px solid rgba(201, 154, 46, .28);
    border-radius: 50%;
}

.person-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 154, 46, .6);
    box-shadow: var(--shadow);
}

.person-card-image {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 20%;
    border-bottom: 1px solid rgba(201, 154, 46, .18);
}

.person-card-content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: start;
    gap: 10px;
    flex: 1;
    padding: 24px;
}

.person-card:not(.has-image) .person-card-content {
    padding: 28px;
}

.person-card-number {
    color: rgba(139, 79, 60, .74);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .14em;
}

.person-card-title {
    color: var(--primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.person-card-text {
    color: var(--muted);
    display: -webkit-box;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-transform: uppercase;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.resource-band {
    position: relative;
    padding: 110px 24px;
    background:
        linear-gradient(135deg, rgba(238, 242, 234, .92), rgba(251, 246, 235, .72));
}

.resource-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 24px;
}

.quran-panel {
    position: relative;
    min-height: 430px;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background:
        radial-gradient(circle at 84% 18%, rgba(201,154,46,.28), transparent 32%),
        linear-gradient(145deg, #083f31, #071f18);
    color: #fff;
}

.quran-panel::after {
    content: "";
    position: absolute;
    right: -88px;
    bottom: -88px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .16);
    transform: rotate(45deg);
}

.quran-panel .section-label {
    color: #f0d78f;
}

.quran-panel h2 {
    position: relative;
    color: #fff;
    font-size: clamp(34px, 4vw, 50px);
}

.quran-panel p:not(.section-label) {
    position: relative;
    max-width: 620px;
    margin: 22px 0 34px;
    color: rgba(255,255,255,.78);
    font-size: 18px;
}

.quran-panel a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #f1d982;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.resource-list {
    display: grid;
    gap: 16px;
}

.resource-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    min-height: 126px;
    border: 1px solid rgba(8, 63, 49, .1);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    transition: transform .2s ease, border-color .2s ease;
}

.resource-item:hover {
    transform: translateX(5px);
    border-color: rgba(201, 154, 46, .48);
}

.resource-item .icon {
    flex: 0 0 auto;
}

.resource-item strong,
.resource-item em {
    display: block;
}

.resource-item strong {
    color: var(--primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
    font-style: normal;
    line-height: 1.16;
}

.resource-item em {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 112px 24px 92px;
    background:
        radial-gradient(circle at 82% 20%, rgba(201,154,46,.22), transparent 28%),
        linear-gradient(135deg, #07271f, #0b4938);
    color: #fff;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='84' height='84' viewBox='0 0 84 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M42 6l10 26 26 10-26 10-10 26-10-26L6 42l26-10z' fill='none' stroke='%23c99a2e' stroke-opacity='.16'/%3E%3C/svg%3E");
    opacity: .35;
}

.page-hero-shell {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 760px) 210px;
    align-items: center;
    gap: 54px;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(44px, 6vw, 72px);
}

.page-hero p:not(.section-label) {
    max-width: 700px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 20px;
}

.page-hero-mark {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
    background:
        radial-gradient(circle, rgba(255,255,255,.12), transparent 62%),
        url("data:image/svg+xml,%3Csvg width='190' height='190' viewBox='0 0 190 190' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23f1d982' stroke-opacity='.38'%3E%3Ccircle cx='95' cy='95' r='72'/%3E%3Cpath d='M95 16l18 61 61 18-61 18-18 61-18-61-61-18 61-18z'/%3E%3Cpath d='M95 46l11 38 38 11-38 11-11 38-11-38-38-11 38-11z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
}

.page-hero-photo {
    margin: 0;
    justify-self: end;
    width: min(310px, 100%);
    overflow: hidden;
    border: 1px solid rgba(241, 217, 130, .38);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.page-hero-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 18%;
}

.page-content-shell {
    padding: 76px 24px 116px;
    background: linear-gradient(180deg, #fff, var(--bg));
}

.page-body {
    max-width: 880px;
    margin: 0 auto;
    padding: 52px;
    border: 1px solid rgba(8, 63, 49, .1);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 55px rgba(8, 63, 49, .08);
    color: #293530;
    font-size: 18px;
}

.page-body > *:first-child { margin-top: 0; }
.page-body > *:last-child { margin-bottom: 0; }

.page-body h2,
.page-body h3 {
    color: var(--primary);
}

.page-body h2 { font-size: 36px; margin-top: 48px; }
.page-body h3 { font-size: 27px; margin-top: 34px; }
.page-body p { margin: 0 0 18px; }
.page-body a { color: var(--primary-2); border-bottom: 1px solid var(--gold); }
.page-body li { margin-bottom: 8px; }

.lineage-hero .page-hero-mark {
    background:
        linear-gradient(135deg, rgba(1, 73, 54, .92), rgba(1, 37, 28, .88)),
        url("legacy/seven-shaykhs.jpg");
    background-size: cover;
    background-position: center;
}

.lineage-page-section {
    padding-top: 78px;
}

.lineage-directory-section {
    padding-top: 36px;
}

.lineage-flow {
    position: relative;
    overflow: hidden;
    padding: 40px;
    border: 1px solid rgba(8, 63, 49, .12);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 0, rgba(201, 154, 46, .16), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(251, 246, 235, .72));
    box-shadow: 0 22px 60px rgba(8, 63, 49, .08);
}

.lineage-flow::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='92' height='92' viewBox='0 0 92 92' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M46 8l10 28 28 10-28 10-10 28-10-28L8 46l28-10z' fill='none' stroke='%23c99a2e' stroke-opacity='.14'/%3E%3C/svg%3E");
    opacity: .46;
    pointer-events: none;
}

.lineage-flow-row {
    position: relative;
    z-index: 1;
}

.lineage-flow-row-single {
    display: flex;
    justify-content: center;
}

.lineage-branch-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.lineage-chain-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 132px;
    width: min(100%, 390px);
    padding: 18px;
    border: 1px solid rgba(8, 63, 49, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    color: inherit;
    box-shadow: 0 14px 36px rgba(8, 63, 49, .08);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.lineage-chain-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 154, 46, .62);
    box-shadow: 0 20px 48px rgba(8, 63, 49, .12);
}

.lineage-chain-photo {
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
    overflow: hidden;
    border: 2px solid rgba(201, 154, 46, .36);
    border-radius: 50%;
    background: #f7f1e3;
}

.lineage-chain-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.lineage-chain-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.lineage-chain-letter {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(201, 154, 46, .16);
    color: #8b4f3c;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.lineage-chain-title {
    color: var(--primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.12;
}

.lineage-chain-location {
    color: #8b4f3c;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.lineage-chain-excerpt {
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lineage-connector,
.lineage-branch-connector,
.lineage-tail-line {
    --lineage-line: rgba(201, 154, 46, .62);
}

.lineage-connector-down {
    position: relative;
    z-index: 1;
    width: 2px;
    height: 48px;
    margin: 0 auto;
    background: var(--lineage-line);
}

.lineage-connector-down::after,
.lineage-tail-line::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--lineage-line);
    border-bottom: 2px solid var(--lineage-line);
    transform: translateX(-50%) rotate(45deg);
}

.lineage-branch-connector {
    position: relative;
    z-index: 1;
    width: min(78%, 760px);
    height: 62px;
    margin: 0 auto;
}

.lineage-branch-connector::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 31px;
    background: var(--lineage-line);
}

.lineage-branch-connector::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 31px;
    height: 2px;
    background: var(--lineage-line);
}

.lineage-branch-row .lineage-chain-card::before {
    content: "";
    position: absolute;
    top: -32px;
    left: 50%;
    width: 2px;
    height: 32px;
    background: rgba(201, 154, 46, .62);
}

.lineage-tail {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 18px;
}

.lineage-tail-line {
    position: relative;
    grid-column: 4;
    justify-self: center;
    width: 2px;
    height: 48px;
    background: var(--lineage-line);
}

.lineage-tail .lineage-chain-card {
    grid-column: 4;
}

.lineage-tail-spacer {
    display: none;
}

.footer {
    padding: 72px 24px;
    background: #061f18;
    color: rgba(255,255,255,.76);
}

.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr .7fr .8fr;
    gap: 48px;
}

.footer .brand {
    color: #fff;
}

.footer p {
    max-width: 440px;
    margin: 18px 0 0;
    color: rgba(255,255,255,.68);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.footer .social-link {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    transition: opacity .2s ease, transform .2s ease;
}

.footer .social-link[aria-label="Facebook"] {
    color: #1877f2;
}

.footer .social-link[aria-label="YouTube"] {
    color: #ff0000;
}

.footer .social-link:hover {
    transform: translateY(-2px);
    opacity: .82;
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.footer h2 {
    margin: 0 0 14px;
    color: #f1d982;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.footer a:not(.brand) {
    display: block;
    margin: 9px 0;
    color: rgba(255,255,255,.72);
}

.footer a:not(.brand):hover {
    color: #fff;
}

@media (max-width: 1040px) {
    .nav-toggle { display: block; }
    .nav-cta { display: none; }
    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .nav-links.is-open { display: flex; }
    .nav-links > a,
    .more-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 13px 10px;
        text-align: left;
    }
    .nav-links > a::after,
    .more-toggle::after {
        display: none;
    }
    .more-menu {
        width: 100%;
    }
    .more-panel {
        position: static;
        width: 100%;
        max-height: 420px;
        display: none;
        margin: 4px 0 8px;
        padding: 16px;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        background: var(--surface-soft);
    }
    .more-menu.is-open .more-panel {
        display: block;
    }
    .more-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .more-group-wide,
    .more-group-full {
        grid-column: auto;
    }
    .more-group-wide .more-group-links,
    .more-group-full .more-group-links {
        grid-template-columns: 1fr;
    }
    .more-group a {
        padding: 8px 0;
    }
    .hero-shell {
        grid-template-columns: 1fr;
        gap: 44px;
        padding-top: 74px;
    }
    .hero-visual {
        min-height: 430px;
        max-width: 620px;
    }
    .hero-arch { height: 388px; }
    .intro-shell,
    .resource-grid,
    .page-hero-shell,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .intro-mark,
    .page-hero-mark {
        display: none;
    }
    .page-hero-photo {
        justify-self: start;
        width: min(360px, 100%);
    }
    .silsila-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lineage-flow {
        padding: 30px;
    }
    .lineage-branch-row,
    .lineage-tail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lineage-branch-connector {
        display: none;
    }
    .lineage-branch-row {
        margin-top: 34px;
    }
    .lineage-branch-row .lineage-chain-card::before {
        display: none;
    }
    .lineage-tail-line,
    .lineage-tail .lineage-chain-card {
        grid-column: 2;
    }
}

@media (max-width: 720px) {
    .nav-shell { padding: 0 18px; }
    .nav-toggle {
        display: grid;
        flex: 0 0 44px;
        place-items: center;
    }
    .brand { font-size: 21px; }
    .site-header .brand { max-width: 270px; }
    .more-groups { grid-template-columns: 1fr; }
    .hero-content,
    .hero-shell > * {
        min-width: 0;
    }
    .hero-shell {
        min-height: auto;
        padding: 58px 20px 96px;
    }
    .hero h1 { font-size: clamp(42px, 15vw, 62px); }
    .hero-content > p:not(.section-label) {
        font-size: 20px;
        line-height: 1.35;
    }
    .hero-visual { min-height: auto; padding: 12px; }
    .hero-visual::before { display: none; }
    .hero-arch {
        height: 304px;
        object-position: center 58%;
    }
    .hero-note {
        margin-top: 12px;
        padding: 17px 18px;
    }
    .hero-note strong { font-size: 22px; }
    .pathways {
        margin-top: 48px;
        grid-template-columns: 1fr;
    }
    .intro-band,
    .section,
    .resource-band,
    .page-content-shell {
        padding-top: 72px;
        padding-bottom: 72px;
    }
    .intro-shell { gap: 34px; }
    .section-heading {
        display: grid;
        gap: 20px;
    }
    .silsila-grid { grid-template-columns: 1fr; }
    .lineage-flow {
        padding: 22px;
    }
    .lineage-flow-row-single,
    .lineage-branch-row,
    .lineage-tail {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }
    .lineage-branch-row {
        margin-top: 0;
    }
    .lineage-branch-row .lineage-chain-card:not(:first-child),
    .lineage-tail .lineage-chain-card {
        margin-top: 34px;
    }
    .lineage-branch-row .lineage-chain-card:not(:first-child)::before,
    .lineage-tail .lineage-chain-card::before {
        content: "";
        position: absolute;
        top: -34px;
        left: 50%;
        width: 2px;
        height: 34px;
        display: block;
        background: rgba(201, 154, 46, .62);
    }
    .lineage-chain-card {
        width: 100%;
        min-height: 124px;
        padding: 16px;
    }
    .lineage-chain-photo {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
    }
    .lineage-chain-title {
        font-size: 21px;
    }
    .lineage-tail-line,
    .lineage-tail .lineage-chain-card {
        grid-column: 1;
    }
    .quran-panel { min-height: auto; padding: 36px 26px; }
    .resource-item { padding: 20px; }
    .page-hero { padding: 76px 20px 68px; }
    .page-body {
        padding: 30px 24px;
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
