
/* ── round 509: the Qur'an's index page, new look (js/quran-home.js adds .qx-v2) ── */
.qx-v2 .qx-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 32px; align-items: center; padding: 36px 40px; text-align: start; border: 0; color: #fff;
    background: radial-gradient(circle at 85% -20%, rgba(95, 211, 166, .28), transparent 60%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E"), #0c3b2e; }
.qx-v2 .qx-hero-star { display: none; }
.qx2-hero-l { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.qx-v2 .qx-hero .qx-head { margin: 0; max-width: none; text-align: start; }
.qx-v2 .qx-hero-ar { text-align: start; font-size: 28px; line-height: 1.2; color: #9be3c8; }
.qx-v2 .qx-hero .q-welcome-title { color: #fff; }
.qx-v2 .qx-hero .q-welcome-subtitle { margin: 8px 0 0; max-width: 560px; color: rgba(255, 255, 255, .78); }
.qx-v2 .qx-hero .qx-search { max-width: none; margin: 4px 0 0; }
.qx-v2 .qx-hero .qx-search input { background: #fff; color: #1b2330; border-color: transparent; }
.qx2-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qx2-q { padding: 7px 13px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font: 500 13px 'Poppins', sans-serif; cursor: pointer; }
.qx2-q:hover { background: rgba(255, 255, 255, .22); }
.qx2-cont { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); min-width: 0; }
.qx2-cont-k { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9be3c8; }
.qx-v2 .qx2-cont .qx-fc-cont { grid-column: auto; display: flex; align-items: center; gap: 16px; width: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: #fff; transform: none; box-shadow: none; }
.qx-v2 .qx2-cont .qx-fc-cont:hover { transform: none; box-shadow: none; }
.qx-v2 .qx2-cont .qx-fc-play { display: none; }
.qx2-cont-play { position: relative; flex: none; width: 84px; height: 84px; display: grid; place-items: center; }
.qx2-ring { position: absolute; inset: 0; width: 84px; height: 84px; }
.qx2-ring circle, .qx2-heard circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.qx2-ring .qx2-r0 { stroke: rgba(255, 255, 255, .18); }
.qx2-ring .qx2-r1 { stroke: #5fd3a6; transition: stroke-dasharray .4s; }
.qx2-cont-play i { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: #0f7a5c; display: grid; place-items: center; transition: transform .15s; }
.qx2-cont-play i svg { width: 24px; height: 24px; margin-inline-start: 3px; }
.qx-fc-cont:hover .qx2-cont-play i { transform: scale(1.06); }
.qx-v2 .qx2-cont .qx-fc-t small { font-size: 11px; letter-spacing: .12em; color: #9be3c8; }
.qx-v2 .qx2-cont .qx-fc-t strong { font-size: 19px; color: #fff; }
.qx-v2 .qx2-cont .qx-fc-sub { color: rgba(255, 255, 255, .72); font-size: 13px; }
.qx-v2 .qx2-cont .qx-fc-bar { display: none; }
.qx2-cont-ar { font: 400 22px/1.2 'Amiri', serif; color: #fff; }
.qx2-cont-acts { display: flex; gap: 8px; }
.qx2-mini { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font: 500 13px 'Poppins', sans-serif; cursor: pointer; }
.qx2-mini:hover { background: rgba(255, 255, 255, .2); }
.qx2-mini svg { width: 15px; height: 15px; }

.qx2-dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.qx2-card { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; border-radius: 22px; border: 1px solid var(--q-border); background: var(--q-sidebar-bg, var(--q-card)); min-width: 0; }
.qx2-heard { flex-direction: row; align-items: center; gap: 18px; }
.qx2-heard svg { flex: none; width: 96px; height: 96px; }
.qx2-heard circle { stroke-width: 9; }
.qx2-heard .qx2-r0 { stroke: var(--q-border); }
.qx2-heard .qx2-r1 { stroke: var(--q-accent); }
.qx2-heard text { font: 700 17px 'Poppins', sans-serif; fill: var(--q-text); }
.qx2-k { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--q-text-secondary); }
.qx2-big { margin: 4px 0 0; font: 700 24px/1.1 'Poppins', sans-serif; color: var(--q-text); }
.qx2-sub { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--q-text-secondary); }
.qx2-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qx2-head b { font-size: 13px; color: var(--q-accent); }
.qx2-head a { font-size: 13px; font-weight: 600; color: var(--q-accent); text-decoration: none; }
.qx2-bars { height: 70px; display: flex; align-items: flex-end; gap: 5px; }
.qx2-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--q-accent) 45%, transparent); }
.qx2-bars i.is-0 { background: var(--q-border); }
.qx2-bars i.is-today { background: var(--q-accent); }
.qx2-hzbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--q-border); }
.qx2-hzbar span { display: block; height: 100%; }
.qx2-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--q-text); }
.qx2-legend span { display: inline-flex; align-items: center; gap: 6px; }
.qx2-legend i { width: 9px; height: 9px; border-radius: 50%; }
.z-c { background: #0f7a5c; } .z-f { background: #5fd3a6; } .z-p { background: #f2a93b; }
.qx2-guest { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; background: color-mix(in srgb, var(--q-card) 85%, var(--q-accent) 15%); }
.qx2-guest p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--q-text); max-width: 520px; }
.qx2-btn, .qx2-btn2, .qx2-btn3 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font: 600 14px 'Poppins', sans-serif; cursor: pointer; white-space: nowrap; }
.qx2-btn { border: 0; background: var(--q-accent); color: #fff; }
.qx2-btn:hover { filter: brightness(1.08); }
.qx2-btn2 { border: 1px solid color-mix(in srgb, var(--q-accent) 35%, var(--q-border)); background: transparent; color: var(--q-accent); }
.qx2-btn2:hover { background: color-mix(in srgb, var(--q-accent) 8%, transparent); }
.qx2-btn3 { border: 0; background: none; color: var(--q-text-secondary); font-weight: 500; }
.qx2-btn svg, .qx2-btn2 svg, .qx2-btn3 svg { width: 17px; height: 17px; }

.qx-v2 .qx-popular { margin: 0 0 30px; }
.qx-v2 .qx-popular .qx-h2 { margin: 0 0 14px; }
.qx-v2 .qx-popular .qx-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; overflow: visible; flex-wrap: nowrap; }
.qx-v2 .qx-popular .qx-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 108px; padding: 18px; border: 0; border-radius: 18px; text-align: start; color: var(--q-text); font: inherit; white-space: normal; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.qx-v2 .qx-popular .qx-chip:hover { color: var(--q-text); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .35); }
.qx2-pc-ar { display: block; font: 400 26px/1.15 'Amiri', serif; }
.qx-v2 .qx-popular .qx-chip b { font-size: 15px; font-weight: 600; }
.qx-v2 .qx-popular .qx-chip small { font-size: 12.5px; color: var(--q-text-secondary); }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+1) { background: color-mix(in srgb, #0f7a5c 11%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+1) .qx2-pc-ar { color: #0f7a5c; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+2) { background: color-mix(in srgb, #3456a8 10%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+2) .qx2-pc-ar { color: #3456a8; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+3) { background: color-mix(in srgb, #c27a1a 12%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+3) .qx2-pc-ar { color: #9a5b0c; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+4) { background: color-mix(in srgb, #6b3fa0 10%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+4) .qx2-pc-ar { color: #6b3fa0; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+5) { background: color-mix(in srgb, #1d6a85 10%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+5) .qx2-pc-ar { color: #1d6a85; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+6) { background: color-mix(in srgb, #0f7a5c 11%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+6) .qx2-pc-ar { color: #0f7a5c; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+7) { background: color-mix(in srgb, #c27a1a 12%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+7) .qx2-pc-ar { color: #9a5b0c; }
.qx-v2 .qx-popular .qx-chip:nth-child(8n+8) { background: color-mix(in srgb, #3456a8 10%, var(--q-bg, #fff)); } .qx-v2 .qx-popular .qx-chip:nth-child(8n+8) .qx2-pc-ar { color: #3456a8; }
body[data-theme="midnight"] .qx2-pc-ar, body[data-theme="slate"] .qx2-pc-ar { color: var(--q-accent) !important; }

.qx-v2 .qx-feats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 34px; }
.qx-v2 .qx-feats .qx-fc:not(.qx-fc-cont) { flex-direction: row; align-items: center; justify-content: flex-start; padding: 14px; border-radius: 16px; background: transparent; }
.qx-v2 .qx-feats .qx-fc-go { display: none !important; }
.qx-v2 .qx-feats .qx-fc-avs img { width: 30px; height: 30px; }

.qx-v2 .qx-num { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; background: conic-gradient(color-mix(in srgb, var(--q-accent) 60%, transparent) calc(var(--p) * 1%), var(--q-border) 0); color: var(--q-text); }
.qx-v2 .qx-num::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--q-card); }
.qx-v2 .qx-num { isolation: isolate; }
.qx-v2 .qx-num::before { z-index: -1; }
.qx-v2 .qx-row.is-partial .qx-num { background: conic-gradient(color-mix(in srgb, var(--q-accent) 60%, transparent) calc(var(--p) * 1%), var(--q-border) 0); }
.qx-v2 .qx-row.is-done .qx-num { background: var(--q-accent); color: var(--q-accent); }
.qx-v2 .qx-row { border-radius: 18px; background: var(--q-bg, var(--q-card)); }
.qx-v2 .qx-row .surah-card { padding: 13px 14px; gap: 14px; }
.qx-v2 .qx-name { font-size: 15px; }
.qx-v2 .qx-ar { font-size: 22px; }

.qx-v2 .qx-facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; border-radius: 20px; overflow: hidden; border: 1px solid var(--q-border); background: var(--q-border); }
.qx-v2 .qx-facts li { border: 0; border-radius: 0; text-align: center; align-items: center; }

@media (max-width: 1100px) {
    .qx-v2 .qx-feats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qx-v2 .qx-popular .qx-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .qx-v2 .qx-hero { grid-template-columns: 1fr; padding: 26px 20px; gap: 22px; }
    .qx2-dash { grid-template-columns: 1fr; }
    .qx2-guest { grid-column: auto; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
    .qx-v2 .qx-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qx-v2 .qx-popular .qx-chips { gap: 10px; }
    .qx-v2 .qx-popular .qx-chip { min-height: 96px; padding: 14px; }
    .qx2-pc-ar { display: block; font-size: 22px; }
    .qx2-heard svg { width: 80px; height: 80px; }
}

/* round 512: My Qur'an in its own tab on the index page (my-quran.php, js/account-quran.js) */
.qx-v2 .q-index-tab[data-view="mine"] { display: inline-flex !important; }
.qx-v2 #index-panel-mine:not(.hidden) { display: block !important; }
.qx-v2 #index-panel-mine > :not(.qx-mine-wrap) { display: none !important; }
.qx-mine-wrap .acc-main, .qx-mine-wrap.acc-main { padding: 0; max-width: none; }
.qx-mine-wrap .qx-mine { padding: 0; margin: 0; max-width: none; }
.qx-mine-wrap .acq-head { margin: 6px 0 18px; }
.qx-mine-wrap .acq-head h1 { display: none; }
.qx-mine-wait { padding: 40px 0; text-align: center; color: var(--q-text-secondary); }
.qx-mine-gate { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 520px; margin: 10px auto 30px; padding: 34px 26px; border-radius: 24px; border: 1px solid var(--q-border); background: var(--q-sidebar-bg, var(--q-card)); text-align: center; }
.qx-mine-gate svg { width: 44px; height: 44px; color: var(--q-accent); }
.qx-mine-gate p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--q-text); }
.qx-mine-gate div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* round 515: the new layout is in the page's HTML from the first paint; reserved room for what js fills in */
.qx2-dash:empty { min-height: 140px; border-radius: 22px; background: var(--q-sidebar-bg, var(--q-card)); }
.qx2-quick:empty { min-height: 30px; }
.qx2-cont-acts:empty { min-height: 40px; }
.qx-v2 .qx-popular .qx-chip { font: 600 15px/1.25 'Poppins', sans-serif; }
