/* Navigation remains within reach on every student page. */
.topbar{position:sticky;top:0;z-index:40;height:72px;min-height:72px}
.top-actions{display:flex;align-items:center;gap:12px}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:8px 12px;border:1px solid #dce3ea;border-radius:12px;background:#f5f6fc;color:#42536c;font-size:12px;font-weight:700;white-space:nowrap}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-sun{display:none}[data-theme=dark] .theme-moon{display:none}[data-theme=dark] .theme-sun{display:block}
.workspace-nav.tabs{position:sticky;top:84px;z-index:35;align-self:center;flex-shrink:0;margin:12px auto 0!important;max-width:calc(100% - 28px)!important;width:max-content!important;overflow:visible;gap:5px!important}
.workspace-nav .tab{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;white-space:nowrap}
.nav-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.theme-toggle:focus-visible,.workspace-nav button:focus-visible{outline:3px solid #62bfae;outline-offset:3px}
html{scroll-padding-top:160px}
@media(max-width:680px){
 .topbar{padding:0 14px!important}.top-actions{gap:8px}.top-actions .connection{display:none}.brand-icon{width:39px!important;height:39px!important;min-width:39px!important;font-size:16px!important}.brand strong{font-size:14px}.brand small{font-size:8px}.theme-toggle{padding:8px 10px;font-size:11px}.top-actions .ghost{padding:8px 10px;font-size:11px}
 .workspace-nav.tabs{position:fixed;top:auto;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%!important;max-width:none!important;margin:0!important;padding:6px 7px calc(6px + env(safe-area-inset-bottom,0px))!important;border-radius:18px 18px 0 0!important;border-bottom:0!important;gap:2px!important;box-shadow:0 -5px 24px #24344614!important}
 .workspace-nav .tab{flex-direction:column;gap:4px;padding:8px 2px!important;min-width:0;min-height:54px;font-size:10px!important;line-height:1.2}
 body.signed-in .shell{padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
 html{scroll-padding-top:85px;scroll-padding-bottom:95px}
}
/* Night palette preserves the campus colours without bright panels. */
html[data-theme=dark]{color-scheme:dark;--ink:#e3eaf0;--ink-deep:#eff5fa;--text:#e3eaf0;--muted:#a6b4c4;--bg:#111b24;--canvas:#111b24;--paper:#1a2733;--border:#334353;--line:#334353;--navy:#e3eaf0;--mint:#7bd9bf;--forest:#347c6b}
[data-theme=dark] body{background:#111b24!important;color:#e3eaf0!important}
[data-theme=dark] .topbar,[data-theme=dark] .tabs{background:#18242f!important;border-color:#334353!important;box-shadow:0 4px 20px #0003!important}
[data-theme=dark] .brand strong,[data-theme=dark] h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] .quick-action,[data-theme=dark] .preview-name,[data-theme=dark] .rank-display-name{color:#e3eaf0!important}
[data-theme=dark] .brand-icon{background:#33304c!important;color:#d5c8ff!important}
[data-theme=dark] .brand small,[data-theme=dark] .muted,[data-theme=dark] .connection,[data-theme=dark] .guest-notice,[data-theme=dark] .intro p,[data-theme=dark] .intro-highlights span,[data-theme=dark] .scope-note,[data-theme=dark] .question-toolbar,[data-theme=dark] .module-button small{color:#a6b4c4!important}
[data-theme=dark] .theme-toggle,[data-theme=dark] .ghost,[data-theme=dark] .tab{background:#22313f!important;border-color:#415365!important;color:#d5e1ed!important}
[data-theme=dark] .tab.active,[data-theme=dark] .tab:hover:not(.active){background:#294b45!important;color:#9ce7d1!important}
[data-theme=dark] .eyebrow,[data-theme=dark] .card-kicker,[data-theme=dark] .link-button,[data-theme=dark] .panel-link{color:#c5b6f2!important}
[data-theme=dark] .card,[data-theme=dark] .auth-card,[data-theme=dark] .home-panel,[data-theme=dark] .kpi-tile,[data-theme=dark] .hero-stat-box,[data-theme=dark] .report-dialog,[data-theme=dark] .figure-dialog{background:#1a2733!important;color:#e3eaf0!important;border-color:#334353!important;box-shadow:none!important}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea,[data-theme=dark] #home-completion-scope{background:#14212c!important;color:#e3eaf0!important;border-color:#415365!important}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#9baabd;opacity:1}
[data-theme=dark] .home-hero{background:linear-gradient(125deg,#1c393c,#2b2842 75%,#3b2f32)!important;border-color:#41455b!important}
[data-theme=dark] .home-hero .duaa-heading,[data-theme=dark] .home-hero .duaa-text{color:#d2e9e4!important}
[data-theme=dark] .duaa-heading span,[data-theme=dark] .duaa-kicker,[data-theme=dark] .home-hero .duaa-closing{color:#d4bdf9!important}
[data-theme=dark] .hero-stat-label,[data-theme=dark] .hero-stat-box>span,[data-theme=dark] .kpi-tile span,[data-theme=dark] .quick-action small,[data-theme=dark] .home-section-head p{color:#adbfce!important}
[data-theme=dark] .kpi-tile strong,[data-theme=dark] .hero-stat-box strong{color:#eff5fa!important}
[data-theme=dark] .hero-progress-track{background:#3d4557!important}
[data-theme=dark] .hero-secondary,[data-theme=dark] .guest-entry{background:#263b41!important;color:#d8f2e9!important;border-color:#46605f!important}
[data-theme=dark] .hero-primary,[data-theme=dark] .primary,[data-theme=dark] .feedback-button{background:#347d6c!important;color:#fff!important;border-color:#508f7f!important}
[data-theme=dark] .home-module-card.circulation-card{background:linear-gradient(130deg,#204b45,#265f57)!important;border-color:#3d7669!important}
[data-theme=dark] .home-module-card.gu-card{background:linear-gradient(130deg,#393151,#4d406a)!important;border-color:#685689!important}
[data-theme=dark] .module-card-title,[data-theme=dark] .module-card-desc,[data-theme=dark] .module-card-bottom,[data-theme=dark] .module-number{color:#e0ecea!important}
[data-theme=dark] .module-card-icon,[data-theme=dark] .module-go{background:#ffffff18!important;color:#e5e0fb!important}
[data-theme=dark] .module-card-bottom{border-color:#ffffff25!important}
[data-theme=dark] .kpi-symbol,[data-theme=dark] .quick-icon,[data-theme=dark] .preview-avatar,[data-theme=dark] .hero-stat-rule{background:#2c4545!important;color:#b3e7d7!important}
[data-theme=dark] .kpi-star,[data-theme=dark] .quick-icon.amber{background:#4d4126!important;color:#f1d594!important}
[data-theme=dark] .kpi-save,[data-theme=dark] .quick-icon.purple,[data-theme=dark] .rank-tag{background:#3b3152!important;color:#d6c1fa!important}
[data-theme=dark] .quick-action{background:transparent!important;border-color:#334353!important}
[data-theme=dark] .answer{background:#182631!important;color:#e3eaf0!important;border-color:#415365!important}
[data-theme=dark] .answer .letter{border-color:#607486!important;background:#233442!important;color:#e3eaf0!important}
[data-theme=dark] .answer:hover:not(:disabled),[data-theme=dark] .answer.chosen{background:#2c4949!important;border-color:#7caca5!important}
[data-theme=dark] .answer.right{background:#22483a!important;border-color:#79bb94!important}
[data-theme=dark] .answer.wrong{background:#4c3036!important;border-color:#d59a9e!important}
[data-theme=dark] .question-feedback,[data-theme=dark] .toggle-row,[data-theme=dark] .preview-message{background:#213a36!important;color:#d4ece3!important;border-color:#568b7b!important}
[data-theme=dark] .question-tools,[data-theme=dark] .rank-row,[data-theme=dark] .preview-rank{border-color:#334353!important}
[data-theme=dark] .question-source,[data-theme=dark] .view-switch button,[data-theme=dark] .question-report{background:#302d48!important;color:#d4c5f5!important;border-color:#5c5475!important}
[data-theme=dark] .question-save,[data-theme=dark] .question-save.saved,[data-theme=dark] .module-button.active{background:#284b42!important;color:#b1e5d2!important;border-color:#527d6e!important}
[data-theme=dark] .module-button{background:#1a2733!important;color:#e3eaf0!important;border-color:#415365!important}
[data-theme=dark] .pill{background:#30404e!important;color:#d1deeb!important}
[data-theme=dark] .pill.teal{background:#27473f!important;color:#b0e5d2!important}
[data-theme=dark] .pill.repeated{background:#4c4027!important;color:#f5d88f!important;border-color:#877243!important}
[data-theme=dark] .dhikr-interstitial{background:linear-gradient(130deg,#302b45,#203e38)!important;border-color:#514b69!important}
[data-theme=dark] .dhikr-verse{color:#d0eddf!important}[data-theme=dark] .dhikr-overline,[data-theme=dark] .dhikr-explanation{color:#c7c1e2!important}
[data-theme=dark] .dhikr-flower{background:#ffffff16!important;color:#d4bff6!important}
[data-theme=dark] .notice{background:#443a26!important;color:#f1d49d!important;border-color:#7e6e47!important}
[data-theme=dark] .inline-error{color:#ffb5b5!important}
[data-theme=dark] .preview-rank.is-self,[data-theme=dark] .rank-row.you{background:#24483e!important;border-color:#578c76!important}
[data-theme=dark] .preview-rank.is-self .preview-name,[data-theme=dark] .rank-row.you .rank-display-name{color:#b4ecd7!important}
[data-theme=dark] .site-footer{border-color:#334353!important;color:#b2becb!important}
[data-theme=dark] .question-image,[data-theme=dark] #figure-full{background:#fff}
[data-theme=dark] .toast{background:#dbeae6;color:#17362d}

[data-theme=dark] .preview-xp,[data-theme=dark] .rank-xp{color:#9fe3cd!important}

/* Shared controls and secondary surfaces use the same palette on every page. */
.question-copy{border:1px solid #ded5fa;border-radius:10px;padding:9px 12px;background:#f1edff;color:#6c58ab;font-size:12px;font-weight:750;min-height:44px}
.you-badge{display:inline-block;align-self:start;border-radius:6px;padding:2px 7px;font-size:10px;font-weight:850;background:#247262;color:#fff}
.rank-row.you{padding:12px}.rank-identity-text,.preview-identity{min-width:0}.you-badge{width:max-content}
#owner-access{margin:0 0 20px}#owner-content{margin-top:20px}.owner-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px}.owner-metrics strong{display:block;font-size:28px}.owner-metrics span{font-size:12px}.owner-chart{display:flex;align-items:end;gap:9px;overflow:auto;padding:12px 0}.owner-day{display:flex;flex:1;min-width:37px;flex-direction:column;align-items:center;justify-content:end;gap:6px;height:165px}.owner-bar{width:100%;min-height:2px;background:#429a86;border-radius:4px 4px 0 0}#copy-text{width:100%;display:block;margin-bottom:15px;resize:vertical}
[data-theme=dark] .avatar-upload,[data-theme=dark] .question-copy,[data-theme=dark] .question-footer button,[data-theme=dark] .report-dialog button:not(.primary),[data-theme=dark] .figure-dialog button{background:#302d48!important;color:#d4c5f5!important;border-color:#5c5475!important}
[data-theme=dark] .profile-avatar-preview{border-color:#415365!important;box-shadow:none!important}
[data-theme=dark] .dhikr-reminder{background:#443a26!important;color:#f1d49d!important;border-color:#7e6e47!important}
[data-theme=dark] .quick-icon.blue{background:#263e55!important;color:#b6d8f6!important}
[data-theme=dark] .kpi-check{background:#294739!important;color:#bae3c3!important}
[data-theme=dark] .rank-avatar{background:#2c4545;color:#d7ebe3}
[data-theme=dark] .you-badge{background:#a5dfc9;color:#153d32}
[data-theme=dark] .report-dialog::backdrop,[data-theme=dark] .figure-dialog::backdrop{background:#070e19cf}
[data-theme=dark] button:disabled{opacity:.65}
button:focus-visible,a:focus-visible,.avatar-upload:focus-within{outline:3px solid #62bfae;outline-offset:3px}
@media(max-width:680px){body.signed-in .toast{bottom:calc(86px + env(safe-area-inset-bottom,0px))}.question-tools{gap:8px}.question-copy{flex:0 1 auto}.profile-details-grid{min-width:0}.profile-details-grid>div{min-width:0}}

#copy-dialog{padding:24px}

[data-theme=dark] .profile-avatar-preview{background-color:#253d3b;color:#cce4dc}

#owner-view{max-width:1200px;width:100%;min-width:0}.owner-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin:20px 0}.owner-filters label{margin:0;font-size:12px}.owner-filters select,.owner-filters input{display:block;width:100%;min-height:44px;padding:10px;margin-top:6px;border:1px solid var(--border);border-radius:10px}.owner-table-wrap{width:100%;max-width:100%;overflow:auto;max-height:440px;border:1px solid var(--border);border-radius:12px;margin:14px 0 25px}.owner-table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.owner-table th,.owner-table td{padding:12px;border-bottom:1px solid var(--border);white-space:nowrap}.owner-table th{position:sticky;top:0;background:#edf4f1;color:#24473e;z-index:1}.owner-table td:nth-child(3){white-space:normal;overflow-wrap:anywhere;min-width:170px}.owner-table tbody tr:last-child td{border-bottom:0}.owner-table tbody tr:hover{background:#edf7f3}[data-theme=dark] .owner-table th{background:#253d3b;color:#d3e9e1}[data-theme=dark] .owner-table tbody tr:hover{background:#25353f}.owner-chart{max-width:100%;border-bottom:1px solid var(--border)}

.question-image{height:auto}
