/* Canonical card standards. Do not add page-specific geometry overrides elsewhere. */
.portal[lang] #workspace{--std-image:48px;--std-heading:15px;--std-body:13px;--std-gap:8px;--std-padding:12px;--std-border:1px solid #d8c7b1}
.portal[lang] #workspace [data-card-template]{box-sizing:border-box;min-width:0;box-shadow:none;transform:none}
/* SERVICES: identical image/title/provider header + identical details row on every record. */
.portal[lang] #workspace [data-card-template=service]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:48px auto;align-content:start;gap:8px;height:auto;min-height:120px;padding:12px;margin:0;border:var(--std-border);border-radius:20px 5px;background:#fffaf1}
.portal[lang] #workspace [data-card-template=service] .service-identity{position:static;display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:24px 20px;gap:4px 10px;height:48px;min-height:48px;margin:0;padding:0;align-content:start}
.portal[lang] #workspace [data-card-template=service] .service-identity>h3{position:static;grid-column:2;grid-row:1;height:24px;min-height:24px;max-width:100%;margin:0;line-height:24px;font-size:15px!important;overflow:visible}
.portal[lang] #workspace [data-card-template=service] .service-title-link{position:static;display:block;min-height:24px;height:24px;line-height:24px;font-size:15px!important;margin:0;padding:0}
.portal[lang] #workspace [data-card-template=service] .service-title-link>span{display:block;min-width:0;max-width:100%;height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.portal[lang] #workspace [data-card-template=service] .service-identity img.service-photo{position:absolute;inset-inline-start:12px;top:12px;display:block;box-sizing:border-box;min-width:48px;max-width:48px;width:48px;height:48px;max-height:48px;object-fit:cover;border-radius:10px;margin:0;padding:0}
.portal[lang] #workspace [data-card-template=service] .service-identity>p{grid-column:2;grid-row:2;align-self:start;min-width:0;height:20px;margin:0;padding:0;line-height:20px;font-size:12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
/* One native disclosure row everywhere; expanded content does not resize sibling cards. */
.portal[lang] #workspace [data-card-template]>.std-card-details,.portal[lang] #workspace [data-card-template] .book-details>.std-card-details{position:relative;z-index:2;display:block;margin:0;padding:0;min-width:0;border:0;border-top:1px solid #d8c7b180;background:none;align-self:start}
.portal[lang] #workspace [data-card-template] .std-card-details>summary{display:list-item;box-sizing:border-box;height:36px;min-height:36px;margin:0;padding:8px 0;font-size:13px!important;font-weight:500;line-height:20px;color:#376c6b;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;list-style-position:inside}
.portal[lang] #workspace [data-card-template] .std-card-body{display:flex;flex-direction:column;gap:8px;padding:8px 0 4px;font-size:13px;line-height:1.7}
.portal[lang] #workspace [data-card-template] .std-card-body :is(p,small,.service-link-pending,.service-login-hint){font-size:13px;line-height:1.7;margin:0;padding:0;height:auto;white-space:normal;overflow:visible}
.portal[lang] #workspace [data-card-template] .std-card-body :is(.agency-actions,.service-action-order){display:flex!important;flex-wrap:wrap;gap:8px;margin:0;padding:0;pointer-events:auto}
.portal[lang] #workspace [data-card-template] .std-card-body a{position:relative;z-index:2;font-size:13px;line-height:1.7;min-height:36px;margin:0;padding:4px 0;white-space:normal}
.portal[lang] #workspace [data-card-template] .std-extra{display:flex;flex-direction:column;gap:8px}
/* COURSES: 144px visual, fixed type/title/source lines, then one disclosure. */
.portal[lang] #workspace .training-page [data-card-template=course]{display:flex;flex-direction:column;align-items:stretch;gap:0;height:auto;min-height:0;margin:0;padding:0;overflow:visible;border:var(--std-border);border-radius:12px;background:#fffaf1}
.portal[lang] #workspace .training-page [data-card-template=course] .book-jacket{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;box-sizing:border-box;align-self:stretch;width:100%;min-height:144px;height:144px;max-height:144px;padding:12px;margin:0;border:0;border-radius:11px 11px 0 0;box-shadow:none;overflow:hidden}
.portal[lang] #workspace .training-page [data-card-template=course] .book-jacket>.book-ornament{font-size:24px;line-height:24px}
.portal[lang] #workspace .training-page [data-card-template=course] .book-jacket>span:not(.book-ornament){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:44px;min-height:44px;font-size:14px;line-height:22px;text-align:center}
.portal[lang] #workspace .training-page [data-card-template=course] .book-jacket small{display:block;width:100%;max-height:18px;margin:0;font-size:11px;line-height:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.portal[lang] #workspace .training-page [data-card-template=course] .book-details{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 24px 20px auto;gap:6px;padding:12px;flex:none;min-height:0;margin:0;align-items:start}
.portal[lang] #workspace .training-page [data-card-template=course] .book-type{height:20px;margin:0;padding:0;font-size:12px;line-height:20px;border-radius:0;background:none}
.portal[lang] #workspace .training-page [data-card-template=course] h2{height:24px;min-height:24px;margin:0;line-height:24px;font-size:15px!important;overflow:visible}
.portal[lang] #workspace .training-page [data-card-template=course] .card-title-text{height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal[lang] #workspace .training-page [data-card-template=course] .book-publisher{height:20px;line-height:20px;margin:0;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* BOOKS: same 240px media box for a licensed cover or an original-title text card. */
.portal[lang] #workspace .library-page [data-card-template=book]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:240px 48px;gap:0;align-content:start;height:290px;min-height:290px;padding:0;margin:0;border:var(--std-border);border-radius:12px;background:#fffaf1;overflow:hidden}
.portal[lang] #workspace .library-page [data-card-template=book] .library-cover{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:240px;min-height:240px;max-height:240px;aspect-ratio:auto;padding:12px;flex:none;margin:0;background:#f0ece3}
.portal[lang] #workspace .library-page [data-card-template=book] .library-cover img{display:block;box-sizing:border-box;width:100%;height:100%;min-height:0;max-height:216px;margin:0;object-fit:contain;filter:none}
.portal[lang] #workspace .library-page [data-card-template=book] .library-title-card{display:flex;flex-direction:column;justify-content:start;gap:12px;box-sizing:border-box;width:100%;height:216px;min-height:216px;max-height:216px;padding:12px;border:1px solid #bfae89;border-inline-start:4px solid #286d6b;overflow:hidden}
.portal[lang] #workspace .library-page [data-card-template=book] .library-title-card strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;min-height:0;max-height:132px;margin:0;font-size:15px!important;font-weight:700;line-height:22px;word-break:normal;overflow-wrap:break-word}
.portal[lang] #workspace .library-page [data-card-template=book] .library-title-category{font-size:11px;line-height:18px;height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal[lang] #workspace .library-page [data-card-template=book] .book-details{display:block;box-sizing:border-box;min-height:48px;height:48px;margin:0;padding:0 12px;flex:none}
.portal[lang] #workspace .library-page [data-card-template=book] .library-card-action{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:48px;min-height:48px;margin:0;padding:0;font-size:13px;font-weight:700;line-height:20px;border:0}
/* RECITERS/SURAHS: one selection-control and name standard; playback behavior is unchanged. */
.portal[lang] #workspace [data-card-template=reciter] .quran-selection{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start;margin:0}
.portal[lang] #workspace [data-card-template=reciter] .quran-selection>label{display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:20px;min-width:0}
.portal[lang] #workspace [data-card-template=reciter] .quran-selection select{display:block;box-sizing:border-box;width:100%;height:48px;min-height:48px;margin:0;padding:8px;border:var(--std-border);border-radius:10px;font-size:15px;line-height:24px}
.portal[lang] #workspace .quran-list>button{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-width:0;height:56px;min-height:56px;margin:0;padding:10px;font-size:15px;line-height:24px}
.portal[lang] #workspace .quran-list>button :is(strong,span){min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px;line-height:24px}
/* Other catalogue titles share the same fixed size, not a per-name adaptive font. */
.portal[lang] #workspace :is(.gov-card,.discover-card,.home-action-card,.public-activity,.discover-category-grid>a) :is(h2,h3,.discover-home-title,.card-title-text,.service-title-link>span,.provider-website-link>span,strong),.portal[lang] #workspace .discover-category-grid>a>span{font-size:15px!important;line-height:24px}
@media(max-width:600px){.portal[lang] #workspace [data-card-template=reciter] .quran-selection{grid-template-columns:minmax(0,1fr)}}
.portal[lang] #workspace [data-card-template] .std-card-details:not([open])>.std-card-body{display:none}
/* PRIVATE DIRECTORIES: same service geometry; events use the subtitle for public dates. */
.portal[lang] #workspace [data-card-template=discovery]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:48px auto;align-content:start;gap:8px;height:auto;min-height:120px;padding:12px;margin:0;border:var(--std-border);border-radius:20px 5px;background:#fffaf1}
.portal[lang] #workspace [data-card-template=discovery] .std-discovery-header{position:static;display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:24px 20px;gap:4px 10px;height:48px;min-height:48px}
.portal[lang] #workspace [data-card-template=discovery] h2{grid-column:2;grid-row:1;height:24px;min-height:24px;line-height:24px;font-size:15px!important;overflow:visible;margin:0}
.portal[lang] #workspace [data-card-template=discovery] .service-title-link{display:block;position:static;height:24px;min-height:24px;line-height:24px;font-size:15px!important}
.portal[lang] #workspace [data-card-template=discovery] .service-title-link>span{height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal[lang] #workspace [data-card-template=discovery] img.service-photo{position:absolute;top:12px;inset-inline-start:12px;box-sizing:border-box;width:48px;height:48px;min-width:48px;max-width:48px;max-height:48px;margin:0;padding:0;object-fit:cover;border-radius:10px}
.portal[lang] #workspace [data-card-template=discovery] .std-card-subtitle{grid-column:2;grid-row:2;height:20px;line-height:20px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}
.portal[lang] #workspace [data-card-template=discovery] .std-card-body small{height:auto;font-size:12px;overflow-wrap:anywhere}
/* LEGAL / EMPLOYERS: independent fixed structures for these non-image catalogues. */
.portal[lang] #workspace [data-card-template=law]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 24px 20px auto;gap:6px;min-height:146px;height:auto;padding:12px;border:var(--std-border);border-radius:20px 5px;background:#fffaf1}
.portal[lang] #workspace [data-card-template=law]>.gov-category,.portal[lang] #workspace [data-card-template=law]>p{display:block;height:20px;min-height:20px;line-height:20px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}
.portal[lang] #workspace [data-card-template=law]>h3{height:24px;min-height:24px;line-height:24px;margin:0;overflow:visible}
.portal[lang] #workspace [data-card-template=law] .card-title-text{height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal[lang] #workspace [data-card-template=employer]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 24px 24px 20px;gap:6px;height:132px;min-height:132px;margin:0;padding:12px;border:var(--std-border);border-radius:20px 5px;background:#fffaf1}
.portal[lang] #workspace [data-card-template=employer]>.gov-card-top{height:20px;line-height:20px;font-size:12px;margin:0;min-width:0;overflow:hidden;white-space:nowrap}
.portal[lang] #workspace [data-card-template=employer]>h3{height:24px;min-height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
.portal[lang] #workspace [data-card-template=employer]>.career-action{height:24px;line-height:24px;font-size:13px;margin:0;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal[lang] #workspace [data-card-template=employer]>.gov-domain{height:20px;line-height:20px;font-size:11px;margin:0;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* PROVIDERS: same category line and 48px identity on every organisation. */
.portal[lang] #workspace [data-card-template=provider]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 48px;gap:8px;height:102px;min-height:102px;box-sizing:border-box;padding:12px;margin:0;align-content:start}
.portal[lang] #workspace [data-card-template=provider] .gov-card-top{height:20px;line-height:20px;margin:0;overflow:hidden;white-space:nowrap;font-size:12px}
.portal[lang] #workspace [data-card-template=provider] h3{height:48px;min-height:48px;margin:0;padding:0}
.portal[lang] #workspace [data-card-template=provider] .provider-website-link{display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px;align-items:center;height:48px;min-height:48px}
.portal[lang] #workspace [data-card-template=provider] img{display:block;width:48px;height:48px;min-width:48px;max-width:48px;object-fit:cover;margin:0;padding:0;border-radius:10px}
.portal[lang] #workspace [data-card-template=provider] .provider-website-link>span{display:block;height:24px;line-height:24px;font-size:15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Page headers use one shared scale, with full text retained in the DOM/title. */
.portal[lang] #workspace :is(.portal-pagehead,.library-head)>h1{display:block;min-width:0;max-width:100%;font-size:24px!important;line-height:34px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 8px}
.portal[lang] #workspace :is(.portal-pagehead,.library-head)>p:last-child{display:block;min-width:0;max-width:100%;font-size:14px!important;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
@media(max-width:600px){
 .portal[lang] #workspace :is(.portal-pagehead,.library-head)>h1{font-size:16px!important;line-height:26px}
 .portal[lang] #workspace :is(.portal-pagehead,.library-head)>p:last-child{font-size:12px!important;line-height:22px}
}
/* One compact, readable policy layout in every language; prose is never clipped. */
.portal[lang] #workspace .privacy-page{width:100%;max-width:850px;margin:0 auto;padding:0;min-width:0}
.portal[lang] #workspace .privacy-page>.portal-pagehead{margin:0;padding:0 0 12px;border-bottom:1px solid #d8c7b1}
.portal[lang] #workspace .privacy-page>.portal-pagehead>h1{font-size:22px!important;line-height:1.5!important;white-space:normal;overflow:visible;text-overflow:clip;margin:0 0 8px}
.portal[lang] #workspace .privacy-page>.portal-pagehead>p:last-child{font-size:15px!important;line-height:1.8!important;white-space:normal;overflow:visible;text-overflow:clip;margin:0}
.portal[lang] #workspace .privacy-page>.terms-content{width:100%;max-width:none;margin:0;padding:0}
.portal[lang] #workspace .privacy-page .terms-content>article{margin:0;padding:14px 0;min-height:0;height:auto;border-bottom:1px solid #d8c7b1}
.portal[lang] #workspace .privacy-page .terms-content h2{font-size:18px!important;line-height:1.5;margin:0 0 6px}
.portal[lang] #workspace .privacy-page .terms-content p{font-size:15px;line-height:1.8;margin:0;white-space:normal;overflow-wrap:break-word;word-break:normal}
.portal[lang] #workspace .privacy-page .terms-content p+p{margin-top:8px}
.portal[lang] #workspace .privacy-page .terms-content>.privacy-source-credit{font-size:12px;line-height:1.7;margin:12px 0 0}
@media(min-width:900px){.portal[lang] #workspace .privacy-page .terms-content p,.portal[lang] #workspace .privacy-page>.portal-pagehead>p:last-child{font-size:16px!important}}
/* Natural reading-start alignment keeps word spacing unchanged in every language. */
.portal[lang] #workspace p{ text-align:start;text-align-last:start;text-justify:none;word-spacing:normal;letter-spacing:normal;text-wrap:wrap;hyphens:none;word-break:normal }
.portal[lang] #workspace :is(.about-content,.about-story,.founder-story,.privacy-page) p{white-space:normal}
.portal[lang] #workspace :is(li,dd,blockquote){text-align:start;text-align-last:start;text-justify:none;word-spacing:normal;letter-spacing:normal;text-wrap:wrap;hyphens:none;word-break:normal}
.portal[lang] #workspace .about-page>.portal-pagehead>p:last-child{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.8}
.portal[lang] #workspace .about-details>article+article{border-inline-start:1px solid #cdbb9e80;padding-inline-start:24px}
@media(max-width:760px){.portal[lang] #workspace .about-details>article+article{border-inline-start:0;padding-inline-start:0;border-top:1px solid #cdbb9e80;padding-top:18px}}
.portal[lang] #workspace .faq-provider-group{min-width:0;margin:0 0 24px}
.portal[lang] #workspace .faq-provider-group>.faq-group-title{margin:0 0 12px;padding:12px 0;border-bottom:1px solid #d8c7b1;line-height:1.5}
.portal[lang] #workspace .service-faq-body :is(p,li){text-align:start;text-align-last:start}
/* One FAQ question and answer scale, including multiline question summaries. */
.portal[lang] #workspace .service-faq>summary{font-family:var(--hn-body);font-size:15px;font-weight:600;line-height:1.8;padding:12px 14px;min-height:48px;box-sizing:border-box;text-align:start;text-align-last:start;text-justify:none;white-space:normal;word-break:normal;overflow-wrap:break-word;letter-spacing:normal;word-spacing:normal;text-wrap:wrap;hyphens:none}
.portal[lang] #workspace .service-faq-body{font-family:var(--hn-body);font-size:15px;line-height:1.8;padding:12px 14px}
.portal[lang] #workspace .service-faq-body :is(p,li){font-size:15px;line-height:1.8;white-space:normal;word-break:normal;text-align:start;text-align-last:start;margin-block:0 8px}
.portal[lang] #workspace .service-faq-body h3{font-size:16px;line-height:1.6;margin:10px 0 6px;text-align:start}

/* Compact shared footer: identity, links, then visit total and rights. */
.portal[lang] .portal-footer{text-align:center;text-align-last:center;height:auto;min-height:0;padding:20px 12px 9px}
.portal[lang] .portal-footer :is(p,a,strong){text-align:center;text-align-last:center;word-spacing:normal;letter-spacing:normal;text-justify:none}
.portal[lang] .portal-footer .footer-top{display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:0}
.portal[lang] .portal-footer .footer-brand-block{width:100%;max-width:none;min-width:0}
.portal[lang] .portal-footer .footer-identity{margin-inline:auto;justify-content:center;gap:7px;min-height:36px}
.portal[lang] .portal-footer .footer-identity>img{width:34px;height:34px;flex:0 0 34px}
.portal[lang] .portal-footer .footer-identity strong{font-size:16px;line-height:1.35}
.portal[lang] .portal-footer .footer-nav{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;gap:0 9px;min-width:0}
.portal[lang] .portal-footer .footer-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0;font-size:clamp(11px,3vw,14px);line-height:1.3;white-space:nowrap}
.portal[lang] .portal-footer .footer-bottom{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;gap:3px 10px;padding:6px 0 0}
.portal[lang] .portal-footer .footer-visits,.portal[lang] .portal-footer .footer-copyright{width:auto;margin:0;font-size:clamp(10px,2.8vw,13px);line-height:1.4}
.portal[lang] .portal-footer .copyright-domain{white-space:nowrap;unicode-bidi:isolate}
.portal[lang][data-page=home]{--home-section-gap:clamp(12px,2vw,20px)}
.portal[lang][data-page=home] #workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--home-section-gap);padding-block-end:0}
.portal[lang][data-page=home] #workspace .home-intro{margin:0;padding-block-end:0}
.portal[lang][data-page=home] #workspace .home-intro .site-search{margin-block-end:0}
.portal[lang][data-page=home] #workspace .home-services{display:grid;gap:var(--home-section-gap);margin:0;padding:0}
.portal[lang][data-page=home] #workspace .home-services .portal-section-head{margin:0}
.portal[lang][data-page=home] #workspace .home-service-category{margin:0}
.portal[lang][data-page=home] .portal-footer{margin-block:var(--home-section-gap) 12px}

.portal[lang][data-page=home] #workspace .discover-home{margin-block:0}

/* Urdu uses native Nastaliq shaping, with room for the descending strokes. */
@font-face{font-family:"Noto Nastaliq Urdu";src:url("/fonts/NotoNastaliqUrdu-Regular.woff2") format("woff2");font-weight:400 500;font-display:swap}
@font-face{font-family:"Noto Nastaliq Urdu";src:url("/fonts/NotoNastaliqUrdu-Bold.woff2") format("woff2");font-weight:600 900;font-display:swap}
html[lang="ur"],.portal[lang="ur"]{--hn-body:"Noto Nastaliq Urdu","Amiri",Tahoma,sans-serif}
.portal[lang="ur"] :is(button,input,select,textarea){font-family:var(--hn-body)}
.portal[lang="ur"] :is(.portal-brand strong,.contact-brand,.footer-identity strong){line-height:1.9}
.portal[lang="ur"][data-page=home] #workspace .home-action-card :is(h3,.discover-home-title){line-height:30px;height:30px;min-height:30px}
.portal[lang="ur"] .portal-footer .footer-nav a{line-height:1.9}
.portal[lang="ur"] .portal-footer .footer-visits{line-height:1.9}

@media(max-width:420px){.portal[lang="ta"] .portal-footer .footer-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:6px}.portal[lang="ta"] .portal-footer .footer-nav a{white-space:normal}}

/* Compact directory and FAQ controls share the page rhythm. */
.portal[lang] #workspace .government-page>.portal-pagehead,
.portal[lang][data-page=faq] #workspace>.portal-pagehead{display:block;margin:0 0 8px;padding:0 0 6px}
.portal[lang] #workspace .government-page .directory-workspace{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px}
.portal[lang] #workspace .government-page .directory-search{grid-column:1/-1}
.portal[lang] #workspace .government-page .directory-view-switch{grid-column:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0}
.portal[lang] #workspace .government-page .directory-view-switch button{min-width:0;padding:4px;font-size:13px;line-height:1.5;min-height:44px;overflow-wrap:break-word}
.portal[lang] #workspace .government-page .directory-filter-panel{grid-column:2;margin:0;padding:0}
.portal[lang] #workspace .government-page .directory-filter-panel[open]{grid-column:1/-1;margin:0;padding:0 0 6px}
.portal[lang] #workspace .government-page .directory-filter-panel>summary{min-height:44px;font-size:13px;padding:8px;line-height:26px}
.portal[lang] #workspace .government-page .provider-selectors{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:4px 0}
.portal[lang] #workspace .government-page .provider-selectors label{min-width:0;font-size:13px;gap:2px}
.portal[lang] #workspace .government-page .directory-toolbar{display:flex;align-items:start;gap:8px;margin:0}
.portal[lang] #workspace .government-page .directory-toolbar>button,
.portal[lang] #workspace .government-page .directory-topic-options>summary{min-height:44px;font:inherit;font-size:13px;padding:8px;box-sizing:border-box}
.portal[lang] #workspace .government-page .directory-topic-options{flex:1;min-width:0;margin:0}
.portal[lang] #workspace .government-page #directory-results{margin:2px 0 0}
.portal[lang][data-page=faq] #workspace .service-faq-section{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.portal[lang][data-page=faq] #workspace .faq-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.75fr);gap:8px;margin:0 0 6px}
.portal[lang][data-page=faq] #workspace .faq-controls>div{min-width:0}
.portal[lang][data-page=faq] #workspace .faq-controls label{font-size:13px;line-height:1.5;margin:0 0 2px}
.portal[lang] #workspace :is(.government-page,.faq-controls) :is(input,select){min-width:0;width:100%;box-sizing:border-box;font-size:16px;min-height:44px}
.portal[lang][data-page=faq] #workspace .faq-provider-group:first-child>.faq-group-title{padding-top:4px}
@media(max-width:480px){.portal[lang][data-page=faq] #workspace .faq-controls{grid-template-columns:minmax(0,1fr);gap:4px}}
.portal[lang="ur"] #workspace :is(.government-page,.faq-controls) :is(input,select,label,button){line-height:1.8}

/* Keep the Quran controls compact while preserving readable touch targets. */
.portal[lang] #workspace .quran-page>.quran-visual-head{display:block;margin:0 0 8px;padding:0 0 6px}
.portal[lang] #workspace .quran-page .quran-visual-head h1{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:clamp(1.3rem,2vw,1.65rem);line-height:1.4;margin:0;max-width:none}
.portal[lang] #workspace .quran-page .quran-visual-head h1 img.service-photo{width:36px;height:36px;flex:0 0 36px;margin:0;border-radius:8px}
.portal[lang] #workspace .quran-page .quran-player{gap:8px;padding:12px}
.portal[lang] #workspace .quran-page .quran-selection{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0}
.portal[lang] #workspace .quran-page .quran-selection label{font-size:.875rem;min-width:0;gap:3px}
.portal[lang] #workspace .quran-page .quran-selection select{font-size:1rem;min-height:44px;width:100%;min-width:0}
.portal[lang] #workspace .quran-page .quran-playback{padding-top:8px}
.portal[lang] #workspace .quran-page .quran-playback h2{font-size:1rem;margin:0 0 6px}
.portal[lang] #workspace .quran-page .quran-buttons{grid-template-columns:44px minmax(0,1fr) 44px minmax(0,1fr);gap:6px;margin:0}
.portal[lang] #workspace .quran-page .quran-buttons .pbtn{font-size:.875rem;min-width:0;min-height:44px;padding:6px 10px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;text-align:center}
.portal[lang] #workspace .quran-page .quran-buttons :is(#quran-prev,#quran-next){font-size:1.2rem}
.portal[lang] #workspace .quran-page .quran-playback-meta{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px;margin-block-start:6px}
.portal[lang] #workspace .quran-page .quran-continue{font-size:.875rem;min-height:44px;padding:0;margin:0}
.portal[lang] #workspace .quran-page #quran-status{font-size:.875rem;margin:0;line-height:1.45}
.portal[lang] #workspace .quran-page .quran-library{margin:10px 0}
.portal[lang] #workspace .quran-page .quran-library>label{font-size:.875rem;gap:4px}
.portal[lang] #workspace .quran-page :is(.quran-source,.quran-name-source){font-size:12px;margin:4px 0;text-align:center;text-align-last:center}
.portal[lang="ur"] #workspace .quran-page .quran-buttons .pbtn{line-height:1.8}
@media(max-width:480px){
 .portal[lang] #workspace .quran-page .quran-selection{grid-template-columns:minmax(0,1fr)}
 .portal[lang] #workspace .quran-page .quran-buttons{grid-template-columns:44px minmax(0,1fr) 44px}
 .portal[lang] #workspace .quran-page .quran-buttons a{grid-column:1/-1}
}

.portal[lang] #workspace .jobs-page .portal-pagehead{margin:0 0 8px;padding:0 0 6px}
.portal[lang] #workspace .jobs-page .portal-pagehead h1{margin:0}
.portal[lang] #workspace .jobs-page .career-controls{padding:8px;gap:6px 10px;margin:0 0 6px}
.portal[lang] #workspace .jobs-page .career-controls label{font-size:13px;line-height:1.5;margin:0;gap:3px}
.portal[lang] #workspace .jobs-page .career-controls :is(input,select){font-size:16px;min-height:44px}
.portal[lang] #workspace .jobs-page .career-count{font-size:12px;margin:4px 0 6px}

.portal[lang] #workspace .discover-page>.portal-pagehead{margin:0 0 8px;padding:0 0 6px}
.portal[lang] #workspace .discover-page>.discover-controls{gap:6px 8px;margin:0 0 4px;padding:0}
.portal[lang] #workspace .discover-page>.discover-controls:has(label[hidden]){grid-template-columns:minmax(0,1fr)}
.portal[lang] #workspace .discover-page :is(label,.discover-order,.discover-guidance)[hidden]{display:none!important}
.portal[lang] #workspace .discover-page>.discover-controls label{font-size:13px;margin:0;gap:2px}
.portal[lang] #workspace .discover-page .discover-order{font-size:13px;margin:4px 0}
.portal[lang] #workspace .discover-page .discover-guidance{margin:4px 0 6px}
.portal[lang] #workspace .discover-page .discover-guidance>summary{font-size:13px;padding:6px 10px;min-height:44px;box-sizing:border-box}

/* Mobile Urdu: use a smaller reading scale without crowding Nastaliq strokes. */
@media(max-width:760px){
 .portal[lang="ur"]:not([data-page=home]) #workspace :is(.portal-pagehead,.library-head) h1{
  font-size:21px;line-height:1.8;white-space:normal;overflow:visible;text-overflow:clip
 }
 .portal[lang="ur"] #workspace .about-page>.portal-pagehead>p:last-child,
 .portal[lang="ur"] #workspace .about-page :is(.founder-message,.qatar-intro,.about-details) p{
  font-size:15px;line-height:28px
 }
 .portal[lang="ur"] #workspace .about-page h2{font-size:19px;line-height:1.8}
 .portal[lang="ur"][data-page=home] #workspace .home-action-card :is(h3,.discover-home-title){
  height:auto;min-height:30px;line-height:28px;white-space:normal;
  overflow:visible;text-overflow:clip;overflow-wrap:anywhere
 }
}

/* Catalogue cards retain their column width when filters leave a partial final row.
   Half-width tracks let that row sit in the middle without empty or duplicate cards. */
.portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid){
 --balanced-columns:4;
 grid-template-columns:repeat(calc(var(--balanced-columns) * 2),minmax(0,1fr));
}
.portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:not([hidden]){grid-column:auto / span 2}
@media(min-width:1100px){
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:nth-child(4n+1):nth-last-child(1){grid-column-start:4}
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:nth-child(4n+1):nth-last-child(2){grid-column-start:3}
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:nth-child(4n+1):nth-last-child(3){grid-column-start:2}
}
@media(max-width:1099px){
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid){--balanced-columns:2}
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:nth-child(2n+1):last-child{grid-column-start:2}
}
@media(max-width:600px){
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid){--balanced-columns:1}
 .portal[lang] #workspace :is(.gov-grid,.service-grid,.careers-grid,.discover-grid,.discover-category-grid,.library-grid)>:nth-child(2n+1):last-child{grid-column-start:auto}
}
@media(max-width:600px){
 .portal[lang] #workspace .discover-category-grid{--balanced-columns:2}
 .portal[lang] #workspace .discover-category-grid>:nth-child(2n+1):last-child{grid-column-start:2}
}
@media(min-width:641px){
 .portal[lang][data-page="establish"] #workspace .gov-grid{--balanced-columns:3;grid-template-columns:repeat(6,minmax(0,1fr))}
 .portal[lang][data-page="establish"] #workspace .gov-grid>:nth-child(n){grid-column-start:auto}
 .portal[lang][data-page="establish"] #workspace .gov-grid>:nth-child(3n+1):nth-last-child(1){grid-column-start:3}
 .portal[lang][data-page="establish"] #workspace .gov-grid>:nth-child(3n+1):nth-last-child(2){grid-column-start:2}
}
@media(max-width:640px){
 .portal[lang][data-page="establish"] #workspace .gov-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal[lang][data-page="establish"] #workspace .gov-grid>:nth-child(n){grid-column-start:auto}
}
/* Keep download controls together directly below playback. */
.portal[lang] #workspace .quran-downloads{
 border:1px solid #d8c9a7;border-radius:12px;background:var(--hn-surface,#fcfaf3);
 padding:10px 12px;margin-block:10px;display:grid;gap:6px;min-width:0
}
.portal[lang] #workspace .quran-downloads[hidden]{display:none}
.portal[lang] #workspace .quran-download-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 12px}
.portal[lang] #workspace .quran-downloads h2{font-size:1rem;line-height:1.45;margin:0}
.portal[lang] #workspace .quran-download-heading strong{font-size:.875rem}
.portal[lang] #workspace .quran-downloads :is(.quran-download-note,#quran-download-status){font-size:.875rem;line-height:1.45;margin:0}
.portal[lang] #workspace #quran-download-status:empty{display:none}
.portal[lang] #workspace .quran-download-actions{display:flex;flex-wrap:wrap;gap:6px}
.portal[lang] #workspace .quran-download-actions .pbtn{min-height:44px;font-size:.875rem;white-space:normal;overflow-wrap:anywhere;padding:6px 12px}
.portal[lang] #workspace .quran-download-actions [hidden]{display:none}
.portal[lang] #workspace .quran-download-meter{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px 12px}
.portal[lang] #workspace .quran-downloads progress{width:100%;height:.65rem;accent-color:#485332}
.portal[lang] #workspace .quran-download-count{font-size:.875rem}
@media(max-width:480px){
 .portal[lang] #workspace .quran-download-actions .pbtn{flex:1 1 9rem}
 .portal[lang] #workspace #quran-download-all{flex-basis:100%}
 .portal[lang] #workspace .quran-download-meter{grid-template-columns:minmax(0,1fr)}
}
