
/* ===== Clarity Revamp 2026 — Onboarding + Polish ===== */
.clarity-welcome-overlay{position:fixed;inset:0;z-index:9999;background:rgba(8,28,22,0.72);backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:center;padding:1rem;opacity:0;pointer-events:none;transition:opacity .35s ease}
.clarity-welcome-overlay.show{opacity:1;pointer-events:auto}
.clarity-welcome-card{background:linear-gradient(165deg,#f7f3eb 0%,#e8f2ec 100%);color:#1c2a22;border-radius:18px;max-width:380px;width:100%;padding:1rem 1rem .85rem;box-shadow:0 24px 60px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.15);text-align:center;transform:translateY(18px) scale(.97);transition:transform .4s cubic-bezier(.22,1,.36,1);position:relative;overflow:hidden;max-height:none}
.clarity-welcome-overlay.show .clarity-welcome-card{transform:translateY(0) scale(1)}
html[data-theme="dark"] .clarity-welcome-card{background:linear-gradient(165deg,#152019 0%,#1a2e24 100%);color:#e7efe9;box-shadow:0 24px 60px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08)}
.clarity-welcome-card::before{content:'';position:absolute;top:-40%;left:-20%;width:140%;height:80%;background:radial-gradient(ellipse,rgba(184,146,42,.18),transparent 70%);pointer-events:none}
.cw-icon{display:none!important}
.cw-moon{font-size:1.15rem;vertical-align:middle;margin-right:.15rem;filter:drop-shadow(0 2px 4px rgba(15,76,58,.2))}
.cw-title{font-family:'Cormorant Garamond',serif;font-size:1.35rem;font-weight:700;color:var(--accent,#0f4c3a);margin:0 0 .2rem;letter-spacing:.02em;line-height:1.25}
html[data-theme="dark"] .cw-title{color:#6bc49a}
.cw-sub{font-size:.95rem;color:var(--text-muted,#5c6b62);margin:0 0 1.15rem;line-height:1.5}
.cw-steps{display:flex;flex-direction:column;gap:.55rem;margin:0 0 1.25rem;text-align:left}
.cw-step{display:flex;align-items:flex-start;gap:.65rem;background:rgba(15,76,58,.07);border:1px solid rgba(15,76,58,.12);border-radius:12px;padding:.65rem .75rem;font-size:.88rem;line-height:1.4}
html[data-theme="dark"] .cw-step{background:rgba(61,155,114,.12);border-color:rgba(61,155,114,.2)}
.cw-step-num{flex:0 0 1.55rem;height:1.55rem;border-radius:50%;background:var(--accent,#0f4c3a);color:#fff;font-weight:700;font-size:.78rem;display:flex;align-items:center;justify-content:center}
.cw-actions{display:flex;flex-direction:column;gap:.45rem}
.cw-actions button{margin:0;width:100%;padding:.7rem 1rem;border-radius:12px;font-weight:600;font-size:.95rem}
.cw-primary{background:var(--accent,#0f4c3a);color:#fff;border:none}
.cw-primary:hover{filter:brightness(1.08)}
.cw-ghost{background:transparent;color:var(--accent,#0f4c3a);border:1px solid rgba(15,76,58,.3)}
html[data-theme="dark"] .cw-ghost{color:#8fd4a0;border-color:rgba(143,212,160,.35)}

.cw-step-btn{
  width:100%;border:1px solid rgba(15,76,58,.12);cursor:pointer;font:inherit;color:inherit;
  background:rgba(15,76,58,.07);text-align:left;padding:.65rem .75rem;border-radius:12px;
  display:flex;align-items:flex-start;gap:.65rem;
}
.cw-step-btn:hover,.cw-step-btn:focus{border-color:var(--accent,#0f4c3a);background:rgba(15,76,58,.12)}
html[data-theme="dark"] .cw-step-btn{background:rgba(61,155,114,.12);border-color:rgba(61,155,114,.2);color:#e7efe9}
/* Compact mobile top banner + theme chips */
#clarity-global-nav.global-nav{
  flex-wrap:wrap;gap:.35rem;padding:8px 10px !important;width:auto !important;max-width:100%;
  margin:0 auto;box-sizing:border-box;
}
#clarity-global-nav .nav-buttons{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center}
#clarity-global-nav .nav-buttons button{padding:6px 10px;font-size:0.75rem;margin-left:0 !important}
.theme-chip-row{display:inline-flex;gap:.25rem;align-items:center;margin-left:.35rem}
.theme-chip{
  border:1px solid #e1dacb;background:#fff;color:#0d4f3c;border-radius:999px;
  padding:4px 10px;font-size:0.68rem;font-weight:700;cursor:pointer;margin:0;
}
.theme-chip.active{background:#0d4f3c;color:#fff;border-color:#0d4f3c}
html[data-theme="dark"] .theme-chip{background:#1a2a22;color:#cfe8d8;border-color:#2a3830}
html[data-theme="dark"] .theme-chip.active{background:#3d9b78;color:#fff;border-color:#3d9b78}
@media(max-width:700px){
  #clarity-global-nav.global-nav{padding:6px 8px !important}
  #clarity-global-nav .nav-brand{font-size:0.85rem}
  #clarity-global-nav .mode-badge{font-size:0.65rem;padding:3px 8px}
}
/* Keep welcome overlay as the only full entry portal */
#clarity-three-doors.hidden{display:none !important}
#clarity-three-doors:not(.hidden){display:flex !important}
.cw-note{font-size:.72rem;color:var(--text-muted);margin-top:.85rem;line-height:1.4;opacity:.9}
/* Start-here chip */
.clarity-start-chip{position:fixed;bottom:calc(4.8rem + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%) translateY(12px);z-index:180;background:linear-gradient(135deg,#0f4c3a,#1a6b52);color:#f7f3eb;border:none;border-radius:999px;padding:.55rem 1.15rem;font-size:.82rem;font-weight:700;box-shadow:0 8px 24px rgba(15,76,58,.35);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s;display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}
.clarity-start-chip.show{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0)}
@media (min-width:901px){.clarity-start-chip{bottom:1.75rem}}
/* Subtle focus + polish */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.nav-tab:focus-visible,.mb-tab:focus-visible{outline-offset:-2px}
.one-action-strip{box-shadow:0 4px 18px rgba(0,0,0,.12)}
.card{transition:box-shadow .2s ease,transform .15s ease}
.card:hover{transform:translateY(-1px)}
/* Sources polish */
.sources-polished{border-left:4px solid var(--gold,#b8922a);background:linear-gradient(135deg,rgba(184,146,42,.08),rgba(15,76,58,.04));padding:1rem 1.1rem;border-radius:0 14px 14px 0;margin:1rem 0}
.sources-polished h3{margin:0 0 .45rem;font-family:'Cormorant Garamond',serif;color:var(--accent);font-size:1.2rem}
.sources-polished ul{margin:.35rem 0 0 1.1rem;font-size:.9rem}
.sources-polished li{margin-bottom:.3rem}
/* Skip link */
.skip-link{position:absolute;top:-100px;left:1rem;background:var(--accent);color:#fff;padding:.5rem 1rem;border-radius:8px;z-index:10000;font-weight:600;transition:top .2s}
.skip-link:focus{top:1rem}

/* Beginner mode — hide advanced density */
html.beginner-mode .tj-level-actions,
html.beginner-mode .uft-reg-section,
html.beginner-mode .uft-file-ops-standalone,
html.beginner-mode .meme-urdu-section,
html.beginner-mode .traffic-stats-details,
html.beginner-mode #asma-all-list,
html.beginner-mode .deep-learn { display: none !important; }
html.beginner-mode .card h2 { font-size: 1.35rem; }
html.beginner-mode .one-action-strip { font-size: 1rem; padding: 0.7rem 1rem; }
.beginner-toggle-wrap { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: rgba(255,255,255,0.9); }
.beginner-toggle-wrap input { accent-color: #f4c430; width: 1rem; height: 1rem; }
.offline-badge.show { display: inline-flex !important; align-items: center; gap: 0.25rem; }
.legacy-print-btn { background: linear-gradient(135deg, #b8922a, #8a6a20) !important; color: #fff !important; border: none; }
@media print {
  body.printing .print-sheet { font-family: Georgia, serif; color: #111; }
  body.printing .print-sheet h1 { color: #0f4c3a; border-bottom: 2px solid #b8922a; padding-bottom: 0.4rem; }
  body.printing .print-sheet .legacy-meta { font-size: 0.9rem; color: #444; margin-bottom: 1rem; }
  body.printing .print-sheet .legacy-section { margin: 1.1rem 0; page-break-inside: avoid; }
  body.printing .print-sheet .legacy-section h2 { font-size: 1.15rem; color: #0f4c3a; margin-bottom: 0.35rem; }
}

/* Ilm Pathway collapsible */
.ilm-pathway-details{border:none;margin:0}
.ilm-pathway-summary{
  display:flex;align-items:center;gap:.65rem;cursor:pointer;list-style:none;
  padding:.15rem 0;user-select:none;-webkit-user-select:none;
}
.ilm-pathway-summary::-webkit-details-marker{display:none}
.ilm-pathway-summary::marker{content:''}
.ilm-sum-icon{font-size:1.35rem;line-height:1;flex-shrink:0}
.ilm-sum-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.1rem}
.ilm-sum-text strong{font-family:'Cormorant Garamond',serif;font-size:1.25rem;color:var(--accent);font-weight:600}
.ilm-sum-meta{font-size:.78rem;color:var(--text-muted);font-weight:500}
.ilm-sum-chevron{
  flex-shrink:0;width:1.6rem;height:1.6rem;border-radius:50%;
  background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;
  font-size:.85rem;transition:transform .25s ease;font-weight:700;
}
.ilm-pathway-details[open] .ilm-sum-chevron{transform:rotate(180deg)}
.ilm-pathway-body{padding-top:.65rem;border-top:1px solid var(--border);margin-top:.55rem}
.ilm-pathway-details:not([open]) .ilm-pathway-body{display:none}

