@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");
/* Qasedak refinement: compact rhythm, dark-first emerald, consistent surfaces */
:root,html[data-theme="dark"]{color-scheme:dark;--q-ref-bg:#071710;--q-ref-panel:#10291e;--q-ref-border:#2b5540;--q-ref-text:#eef9f1}
html[data-theme="light"]{color-scheme:light;--q-ref-bg:#f4faf6;--q-ref-panel:#fff;--q-ref-border:#c8e0d0;--q-ref-text:#163b29}
.q-compact-header.site-header{background:linear-gradient(105deg,#061d14,#0d3928 55%,#15543a)!important;box-shadow:0 5px 22px #0003!important}
.q-compact-header .q-compact-inner{min-height:78px!important;padding:8px 26px!important;gap:16px!important}
.q-compact-header .q-compact-brand{font-size:25px!important;gap:11px!important;font-weight:800!important}
.q-compact-header .q-compact-brand img{width:56px!important;height:56px!important;object-fit:contain!important;border-radius:0!important;filter:drop-shadow(0 3px 10px #0006)!important}
.q-compact-header .q-compact-nav{gap:3px!important}
.q-compact-header .q-compact-nav a{padding:9px 11px!important;font-size:14px!important;border-radius:9px!important}
.q-compact-header .q-account-menu summary{padding:10px 13px!important}
.q-compact-header #q-theme-select{height:40px!important}
.q-compact-footer .q-footer-inner{padding:18px 26px!important;gap:15px!important}
.q-footer-identity{display:flex;align-items:center;gap:17px;flex-wrap:wrap}
.q-footer-brand{display:inline-flex;align-items:center;gap:8px!important;font-weight:800!important;font-size:18px!important;padding:0!important}
.q-footer-brand img{width:35px;height:35px;object-fit:contain;filter:drop-shadow(0 2px 5px #0004)}
.q-compact-footer nav{gap:4px!important}
.q-compact-footer nav a{padding:7px 10px!important}
/* Reduce excess whitespace without flattening every layout */
main#main-content .container{max-width:1180px}
main#main-content section.hero{padding-top:40px!important;padding-bottom:40px!important}
main#main-content .section-heading{margin-bottom:18px!important}
main#main-content .cards-grid,main#main-content .category-grid,main#main-content .sitemap-grid{gap:16px!important}
/* Nested surfaces should not look like unrelated floating boxes */
main#main-content .card .card,main#main-content .q-card .q-card,main#main-content .poem-card .card{box-shadow:none!important;background:transparent!important;border-color:var(--q-ref-border)!important}
.admin-wrapper .admin-tabs{position:sticky;top:0;z-index:30;background:var(--q-ref-panel);border:1px solid var(--q-ref-border);border-radius:12px;padding:7px;gap:6px}
.admin-wrapper .admin-heading{margin-bottom:14px!important}
.admin-wrapper .admin-tabs a{border-radius:9px!important}
@media(max-width:950px){.q-compact-header .q-compact-inner{min-height:72px!important;padding:8px 16px!important}.q-compact-header .q-compact-brand img{width:46px!important;height:46px!important}}
@media(max-width:600px){.q-compact-header .q-compact-inner{min-height:68px!important;padding:8px 12px!important}.q-compact-header .q-compact-brand{font-size:21px!important}.q-compact-header .q-compact-brand img{width:42px!important;height:42px!important}.q-compact-footer .q-footer-inner{padding:17px 12px!important;gap:10px!important}.q-footer-identity{justify-content:center;gap:9px}main#main-content section.hero{padding-top:25px!important;padding-bottom:25px!important}}

/* Final header logo, icon-only theme switch, and higher-contrast light mode */
.q-compact-header .q-compact-inner{min-height:84px!important}
.q-compact-header .q-compact-brand img{width:74px!important;height:74px!important;max-width:none!important;object-fit:contain!important}
.q-theme-toggle{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid rgba(255,255,255,.27);border-radius:12px;background:rgba(255,255,255,.10);color:#fff;cursor:pointer;transition:background .2s,transform .2s}
.q-theme-toggle:hover{background:rgba(255,255,255,.19);transform:translateY(-1px)}
.q-theme-toggle:focus-visible{outline:3px solid #a6e8bd;outline-offset:3px}
.q-theme-toggle svg{width:22px;height:22px}
html[data-theme="dark"] .q-theme-sun,html[data-theme="light"] .q-theme-moon{display:none}
html[data-theme="light"]{--q-ref-bg:#f2f7f3;--q-ref-panel:#fff;--q-ref-border:#b4d0be;--q-ref-text:#123b27;color-scheme:light}
html[data-theme="light"] body{background-color:#f2f7f3;color:#163e2a}
html[data-theme="light"] main#main-content .card,html[data-theme="light"] main#main-content .q-card{border-color:#b4d0be;box-shadow:0 5px 18px rgba(15,65,35,.07)}
html[data-theme="light"] main#main-content h1,html[data-theme="light"] main#main-content h2,html[data-theme="light"] main#main-content h3{color:#103d27}
@media(max-width:950px){.q-compact-header .q-compact-brand img{width:60px!important;height:60px!important}.q-compact-header .q-compact-inner{min-height:76px!important}}
@media(max-width:600px){.q-compact-header .q-compact-brand img{width:52px!important;height:52px!important}.q-compact-header .q-compact-inner{min-height:70px!important}.q-theme-toggle{width:38px;height:38px;border-radius:10px}.q-theme-toggle svg{width:20px;height:20px}}


/* Header update v4: sticky glass bar and capsule navigation */
html{scroll-padding-top:110px}
.site-header.q-compact-header{position:sticky!important;top:0!important;z-index:99999!important;width:100%!important;isolation:isolate;background:#06130e!important;border-bottom:1px solid #31634b!important;box-shadow:0 5px 24px #0007!important;overflow:visible!important}
.q-compact-header::before,.q-compact-header::after{pointer-events:none!important}
.q-compact-header .q-compact-inner{max-width:1400px!important;margin:0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:8px 24px!important;min-height:96px!important}
.q-compact-header .q-compact-brand{display:inline-flex!important;align-items:center!important;flex-shrink:0!important;gap:10px!important;color:#fff!important;text-decoration:none!important;white-space:nowrap!important}
.q-compact-header .q-compact-brand img{width:82px!important;height:82px!important;max-width:82px!important;object-fit:contain!important;display:block!important;filter:drop-shadow(0 3px 7px #0008)!important}
.q-compact-header .q-compact-nav{display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 auto!important;gap:4px!important;padding:7px!important;min-width:0!important;background:#f8faf9!important;border-radius:999px!important;box-shadow:inset 0 0 16px #142f2533,0 0 16px #ffffff33!important}
.q-compact-header .q-compact-nav a{color:#0c3020!important;background:transparent!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;padding:12px 15px!important;font-size:14px!important;font-weight:800!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important;transition:background .2s,color .2s!important}
.q-compact-header .q-compact-nav a:hover,.q-compact-header .q-compact-nav a.active{background:#d8e9df!important;color:#074d2d!important;transform:none!important}
.q-compact-header .q-compact-tools{display:flex!important;align-items:center!important;gap:9px!important;flex-shrink:0!important}
.q-compact-header .q-theme-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:5!important;width:46px!important;height:46px!important;min-width:46px!important;background:#f5faf7!important;color:#103d27!important;border:2px solid #b4d8c2!important;border-radius:50%!important;box-shadow:0 2px 10px #0005!important;padding:0!important;cursor:pointer!important}
.q-compact-header .q-theme-toggle svg{display:block!important;width:24px!important;height:24px!important;stroke:currentColor!important;opacity:1!important;visibility:visible!important}
html[data-theme="dark"] .q-compact-header .q-theme-sun,html[data-theme="light"] .q-compact-header .q-theme-moon{display:none!important}
.q-compact-header .q-theme-toggle:hover{background:#d6f3df!important;transform:translateY(-1px)!important}
.q-compact-header .q-account-menu{position:relative!important}
.q-compact-header .q-account-menu summary{color:#fff!important;border:1px solid #4c8062!important;border-radius:999px!important;padding:12px 14px!important;cursor:pointer!important;white-space:nowrap!important}
.q-compact-header .q-account-dropdown{z-index:100001!important}
html[data-theme="light"] .site-header.q-compact-header{background:#e6f1e9!important;border-bottom-color:#b5d1bf!important;box-shadow:0 4px 18px #123e261c!important}
html[data-theme="light"] .q-compact-header .q-compact-brand{color:#123d28!important}
html[data-theme="light"] .q-compact-header .q-compact-nav{background:#fff!important;box-shadow:inset 0 0 0 1px #bed6c6,0 2px 13px #123e261c!important}
html[data-theme="light"] .q-compact-header .q-account-menu summary{color:#123d28!important;border-color:#a6c9b3!important}
@media(max-width:1100px){.q-compact-header .q-compact-inner{gap:9px!important;padding:8px 13px!important}.q-compact-header .q-compact-nav a{font-size:12px!important;padding:10px 9px!important}.q-compact-header .q-compact-brand img{width:64px!important;height:64px!important}}
@media(max-width:850px){.q-compact-header .q-compact-nav{display:none!important}.q-compact-header .q-compact-inner{min-height:74px!important}.q-compact-header .q-compact-brand img{width:60px!important;height:60px!important}.q-compact-header .q-theme-toggle{width:42px!important;height:42px!important;min-width:42px!important}.q-compact-header .q-mobile-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important}.q-compact-header .q-mobile-nav{background:#0c2a1c!important;padding:12px!important;box-shadow:0 10px 20px #0005!important}.q-compact-header .q-mobile-nav[hidden]{display:none!important}}
@media(max-width:480px){.q-compact-header .q-compact-inner{padding:6px 10px!important}.q-compact-header .q-compact-brand img{width:52px!important;height:52px!important}.q-compact-header .q-compact-brand{font-size:19px!important}.q-compact-header .q-account-menu summary{font-size:12px!important;padding:9px!important}}

/* Qasedak footer batch 4 — scoped: does not alter approved header */
.q-premium-footer{background:linear-gradient(145deg,#071c14,#103323)!important;border-top:1px solid rgba(127,205,156,.24)!important;color:#d7eadd!important;box-shadow:0 -8px 28px rgba(0,0,0,.08)}
.q-premium-footer .q-footer-inner{max-width:1200px!important;margin:auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:16px 26px!important;padding:20px 24px!important}
.q-premium-footer .q-footer-brand{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important;padding:4px!important;background:rgba(255,255,255,.045)!important;border:1px solid rgba(174,228,190,.16)!important;border-radius:16px!important}
.q-premium-footer .q-footer-brand img{display:block!important;width:62px!important;height:62px!important;object-fit:contain!important;filter:drop-shadow(0 2px 5px #0005)!important}
.q-premium-footer .q-footer-nav{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:6px!important}
.q-premium-footer .q-footer-nav a{color:#e2f1e7!important;font-size:14px!important;font-weight:650!important;text-decoration:none!important;border:1px solid transparent!important;border-radius:999px!important;padding:9px 13px!important;transition:background .2s,border-color .2s!important}
.q-premium-footer .q-footer-nav a:hover,.q-premium-footer .q-footer-nav a:focus-visible{background:rgba(148,217,167,.13)!important;border-color:rgba(148,217,167,.25)!important}
.q-premium-footer .q-footer-nav .q-footer-support{border-color:rgba(148,217,167,.32)!important;background:rgba(72,150,99,.17)!important}
.q-premium-footer .q-footer-meta{display:flex!important;flex-direction:column!important;gap:5px!important;color:#b5d2bf!important;font-size:12px!important;line-height:1.7!important}
.q-premium-footer .q-footer-meta a{color:inherit!important;text-decoration:none!important}
html[data-theme="light"] .q-premium-footer,body.light-theme .q-premium-footer{background:linear-gradient(135deg,#e6f1e8,#f4f9f4)!important;color:#163f29!important;border-top-color:#c5ddcc!important}
html[data-theme="light"] .q-premium-footer .q-footer-nav a,body.light-theme .q-premium-footer .q-footer-nav a{color:#17482d!important}
html[data-theme="light"] .q-premium-footer .q-footer-meta,body.light-theme .q-premium-footer .q-footer-meta{color:#365d43!important}
html[data-theme="light"] .q-premium-footer .q-footer-brand,body.light-theme .q-premium-footer .q-footer-brand{background:#fff!important;border-color:#c5ddcc!important}
html[data-theme="light"] .q-premium-footer .q-footer-nav .q-footer-support,body.light-theme .q-premium-footer .q-footer-nav .q-footer-support{background:#d5eadb!important;border-color:#a5cbb1!important}
@media(max-width:780px){.q-premium-footer .q-footer-inner{justify-content:center!important;text-align:center!important;padding:18px 14px!important;gap:12px!important}.q-premium-footer .q-footer-brand img{width:52px!important;height:52px!important}.q-premium-footer .q-footer-meta{width:100%!important;align-items:center!important}}


/* Batch 5: interior pages — avoid altering approved header, footer and admin */
:root{--q-read-bg:#0b1f16;--q-read-panel:#123323;--q-read-line:#315c43;--q-read-text:#eaf6ee;--q-read-muted:#b7d2c0}
html[data-theme="light"]{--q-read-bg:#f2f7f3;--q-read-panel:#fff;--q-read-line:#b8d2c0;--q-read-text:#143c28;--q-read-muted:#436b50}
/* Restrict adjustments to actual content containers, not navigation */
main#main-content .container,main#main-content .protected-content{max-width:1180px}
main#main-content .hero{padding-top:30px!important;padding-bottom:30px!important}
main#main-content .hero h1{margin-bottom:9px!important;line-height:1.5!important}
main#main-content .hero p{line-height:1.85!important}
main#main-content .poetry-category-grid,main#main-content .featured-grid{gap:16px!important}
main#main-content .poetry-category-card{border-radius:17px!important;overflow:hidden;border:1px solid var(--q-read-line)!important;box-shadow:0 7px 24px #0002!important}
main#main-content .poetry-category-content{padding:17px!important}
main#main-content .category-header-box{margin-bottom:15px!important}
main#main-content .category-header-box>div{background:var(--q-read-panel)!important;border:1px solid var(--q-read-line)!important;border-top:3px solid #438d64!important;box-shadow:0 5px 18px #0002!important;border-radius:16px!important;color:var(--q-read-text)!important}
main#main-content .category-header-box>div>div:nth-child(2)>div:first-child{color:var(--q-read-text)!important}
main#main-content .category-header-box>div>div:nth-child(2)>div:nth-child(2){color:var(--q-read-muted)!important}
main#main-content .poem-container,main#main-content .section-container{border-radius:18px!important;border:1px solid var(--q-read-line)!important;box-shadow:0 8px 26px #0002!important;overflow:hidden}
main#main-content .poem-content-area,main#main-content .section-content-area{padding:clamp(16px,2.6vw,27px)!important}
main#main-content .poem-title-bar,main#main-content .section-title-bar{margin-bottom:10px!important}
main#main-content .poem-lines{line-height:2.1!important}
main#main-content .content-box{border-radius:15px!important;box-shadow:none!important}
main#main-content .content-box .content-box,main#main-content .section-container .content-box{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
html[data-theme="light"] main#main-content .poem-container,html[data-theme="light"] main#main-content .section-container{background:#fff!important;color:#143c28!important}
html[data-theme="light"] main#main-content .poetry-category-card{background:#fff!important;color:#143c28!important}
@media(max-width:700px){main#main-content .hero{padding-top:22px!important;padding-bottom:22px!important}main#main-content .poem-content-area,main#main-content .section-content-area{padding:15px!important}main#main-content .category-header-box>div{padding:10px 12px!important}}

/* Restored from current site: theme contrast and scoped poem selection. */
html[data-theme] .q-compact-header .q-compact-nav {background:#f8faf9!important}
html[data-theme] .q-compact-header .q-compact-nav a,html[data-theme] .q-compact-header .q-compact-nav a:link,html[data-theme] .q-compact-header .q-compact-nav a:visited{color:#123a29!important;-webkit-text-fill-color:#123a29!important;opacity:1!important;visibility:visible!important;text-shadow:none!important}
html[data-theme] .q-compact-header .q-compact-nav a:hover{color:#074d2d!important;-webkit-text-fill-color:#074d2d!important;background:#dcebe1!important}
html[data-theme] .q-compact-header .q-account-dropdown{background:#123c2b!important}
html[data-theme] .q-compact-header .q-account-dropdown a,html[data-theme] .q-compact-header .q-account-dropdown a:visited{color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important}
html[data-theme] .q-compact-header .q-account-dropdown a:hover{background:#256344!important}
html[data-theme="light"] .q-premium-footer .q-footer-nav a,html[data-theme="light"] .q-premium-footer .q-footer-meta,html[data-theme="light"] .q-premium-footer .q-footer-meta *,html[data-theme="light"] .q-premium-footer .q-footer-support{color:#123a29!important;-webkit-text-fill-color:#123a29!important;opacity:1!important}
html[data-theme="dark"] .q-premium-footer .q-footer-nav a,html[data-theme="dark"] .q-premium-footer .q-footer-meta,html[data-theme="dark"] .q-premium-footer .q-footer-meta *,html[data-theme="dark"] .q-premium-footer .q-footer-support{color:#f5fff7!important;-webkit-text-fill-color:#f5fff7!important;opacity:1!important}
html[data-theme] .q-compact-header *,html[data-theme] .q-premium-footer *{font-family:'Vazirmatn',Tahoma,sans-serif!important}
html[data-theme="dark"] #poem-select,html[data-theme="dark"] #poem-select option{background:#143c2b!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html[data-theme="light"] #poem-select,html[data-theme="light"] #poem-select option{background:#fff!important;color:#123a29!important;-webkit-text-fill-color:#123a29!important}
html[data-theme] #poem-preview .content-box{background:transparent!important}
html[data-theme] #poem-preview .poem-preview-body{background-color:#123c2b!important;background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#b67a2e!important;text-align:center!important;font-family:'Noto Nastaliq Urdu',serif!important;text-shadow:0 2px 5px #000!important;line-height:3.2!important}
html[data-theme] #poem-preview .poem-preview-body *{color:#fff!important;-webkit-text-fill-color:#fff!important;font-family:'Noto Nastaliq Urdu',serif!important;opacity:1!important}
html[data-theme="dark"] #poem-preview #preview-title{color:#fff!important;-webkit-text-fill-color:#fff!important}
html[data-theme="light"] #poem-preview #preview-title{color:#123a29!important;-webkit-text-fill-color:#123a29!important}
html[data-theme="dark"] .explanation-text,html[data-theme="dark"] .bottom-note{color:#f4fff7!important;-webkit-text-fill-color:#f4fff7!important}
html[data-theme="light"] .explanation-text,html[data-theme="light"] .bottom-note{color:#173b2a!important;-webkit-text-fill-color:#173b2a!important}
html[data-theme="dark"] .bottom-note{background:#194632!important}
html[data-theme="light"] .bottom-note{background:#f6f7f1!important}

/* Qasedak release review: scoped typography and contrast */
@font-face{font-family:'Noto Nastaliq Urdu';src:url('../includes/fonts/NotoNastaliqUrdu.ttf') format('truetype');font-display:swap}
html body,html body :is(h1,h2,h3,h4,h5,h6,p,li,label,input,textarea,select,button,summary,table,th,td,nav,a){font-family:'Vazirmatn',Tahoma,sans-serif}
html body :is(.poem-lines,.poem-text,.poem-verse,.poetry-text,.poem-content,.poem-content-area .verse,.poetry-content .verse) ,html body :is(.poem-lines,.poem-text,.poem-verse,.poetry-text,.poem-content) *{font-family:'Noto Nastaliq Urdu',serif!important}
/* Hero is dark green in both modes, so its text must be light in both modes */
html[data-theme] body main .hero :is(h1,h2,p),html[data-theme] body main .hero h1:not(.highlight),html[data-theme] body main .hero .subtitle{color:#fffaf2!important;opacity:1!important;text-shadow:0 1px 2px #08201688}
html[data-theme] body main .hero .highlight{color:#ff9c32!important}
/* Copyright dark heading card: do not inherit dark text from light-mode surfaces */
html[data-theme] .copyright-intro,html[data-theme] .copyright-intro :is(h1,h2,p,small),html[data-theme] .copyright-box .copyright-intro :is(h1,h2,p){color:#fffaf2!important;opacity:1!important}
/* Sitemap list body contrasts with dark category blocks */
html[data-theme="dark"] .sitemap-page .card-body,html[data-theme="dark"] .sitemap-page .compact-list{background:#142e22!important;color:#f4fff6!important}
html[data-theme="dark"] .sitemap-page .compact-item,html[data-theme="dark"] .sitemap-page .compact-item :is(span,.item-title){color:#f4fff6!important;opacity:1!important}
html[data-theme="light"] .sitemap-page .card-body,html[data-theme="light"] .sitemap-page .compact-list{background:#fff!important;color:#173b2a!important}
html[data-theme="light"] .sitemap-page .compact-item,html[data-theme="light"] .sitemap-page .compact-item :is(span,.item-title){color:#173b2a!important;opacity:1!important}
html[data-theme] .sitemap-page .card-header,html[data-theme] .sitemap-page .card-header :is(span,strong){color:#fff!important;opacity:1!important}
/* About page uses a white content panel even in dark mode; dark text there is intentional */
html[data-theme="dark"] .about-page .about-profile,html[data-theme="dark"] .about-page .about-profile-info{color:#f4fff6}
html[data-theme="dark"] .about-page .about-profile-info :is(h2,p,.about-title,.about-takhallos){color:#f4fff6!important;opacity:1!important}
