/* User guide pages (Portal /Help/Guide and Website /help). Keep both copies identical.
   --help-offset = height of whatever sticks to the top of the page (the Website's sticky menu); the Portal uses the default. */
.help { --help-offset: 1rem; --help-accent: var(--color-accent-600, #059669); --help-navy: #0f2a47; max-width: 1240px; margin: 0 auto; }
html .help[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 2.05; }

/* ---- Header ---- */
.help-head {
  display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; justify-content: space-between; align-items: center;
  padding: 1.75rem 2rem; margin-bottom: 1.5rem;
  border: 1px solid var(--bs-border-color, #e2e8f0); border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
}
.help-head h1 { font-weight: 700; letter-spacing: -.01em; color: var(--help-navy); }
.help-head p { margin-top: .35rem; font-size: 1.05rem; }
.help-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---- Search ---- */
.help-search { position: relative; display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.help-search > .bi-search { position: absolute; inset-inline-start: 1.1rem; color: var(--bs-secondary-color, #64748b); pointer-events: none; font-size: 1.05rem; }
.help-search .form-control { padding-inline: 2.9rem 8rem; height: 3.25rem; font-size: 1.05rem; border-radius: 99px; box-shadow: 0 2px 10px rgba(15, 23, 42, .06); }
.help-search .form-control:focus { box-shadow: 0 0 0 .25rem rgba(5, 150, 105, .18); border-color: var(--help-accent); }
.help-count { position: absolute; inset-inline-end: 1.25rem; color: var(--bs-secondary-color, #64748b); font-size: .9rem; white-space: nowrap; pointer-events: none; }
.help-search #helpClear { position: absolute; inset-inline-end: 5.5rem; border-radius: 99px; padding-block: .15rem; }
#helpMyPlan + label { margin-inline-start: .35rem; }

/* ---- Layout ---- */
.help-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2rem; align-items: start; margin-top: 1.5rem; }
.help-body, .help-toc { min-width: 0; }

/* ---- Contents ---- */
.help-toc {
  position: sticky; top: calc(var(--help-offset) + .5rem); max-height: calc(100vh - var(--help-offset) - 2rem); overflow: auto;
  border: 1px solid var(--bs-border-color, #e2e8f0); border-radius: 1rem; padding: 1.1rem 1rem 1.25rem; background: var(--bs-body-bg, #fff);
  font-size: .93rem; box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
}
.help-toc-title { font-weight: 700; font-size: 1rem; margin: 0 .5rem .75rem; color: var(--help-navy); }
.help-toc-sec { margin: 1.1rem .5rem .35rem; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color, #64748b); line-height: 1.4; }
.help-toc a { display: block; padding: .38rem .75rem; margin: .05rem 0; border-radius: .5rem; color: inherit; text-decoration: none; line-height: 1.4; transition: background-color .15s ease, color .15s ease, padding .15s ease; }
.help-toc a:hover { background: #f1f5f9; padding-inline-start: 1rem; }
.help-toc a.active { background: #ecfdf5; color: #047857; font-weight: 600; box-shadow: inset 3px 0 0 var(--help-accent); }
.help[dir="rtl"] .help-toc a.active { box-shadow: inset -3px 0 0 var(--help-accent); }

/* ---- Chapters and screens ---- */
.help-chapter { margin-bottom: 2.5rem; }
.help-chapter-title {
  font-size: 1.45rem; font-weight: 700; color: var(--help-navy); margin: 0 0 1.25rem; padding: .15rem 0 .15rem 1rem;
  border-inline-start: 5px solid var(--help-accent); line-height: 1.3; scroll-margin-top: calc(var(--help-offset) + 1rem);
}
.help-screen {
  border: 1px solid var(--bs-border-color, #e2e8f0); border-radius: 1rem; padding: 1.75rem 2rem; margin-bottom: 1.5rem;
  background: var(--bs-body-bg, #fff); box-shadow: 0 2px 12px rgba(15, 23, 42, .04); scroll-margin-top: calc(var(--help-offset) + 1rem);
}
.help-screen > h2, .help-screen > h3 { font-weight: 700; color: var(--help-navy); margin-bottom: .75rem; }
.help-screen > p { font-size: 1.02rem; line-height: 1.7; margin-bottom: 1rem; }
.help-screen:target { animation: help-flash 1.6s ease-out 1; }
@keyframes help-flash { 0% { box-shadow: 0 0 0 4px rgba(5, 150, 105, .35); } 100% { box-shadow: 0 2px 12px rgba(15, 23, 42, .04); } }

.help-plans { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--bs-secondary-color, #64748b); margin: 1rem 0 .75rem; }
.help-plan { display: inline-block; padding: .15rem .75rem; border-radius: 99px; border: 1px solid var(--bs-border-color, #e2e8f0); font-size: .8rem; line-height: 1.7; }
.help-plan.on { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.help-plan.off { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.help-plannote { font-size: .9rem; line-height: 1.55; color: #92400e; background: #fffbeb; border-inline-start: 4px solid #f59e0b; padding: .7rem 1rem; border-radius: .5rem; margin: .75rem 0 1rem; }

.help-shot { margin: 1.25rem 0 1.5rem; border: 1px solid var(--bs-border-color, #e2e8f0); border-radius: .75rem; overflow: hidden; box-shadow: 0 6px 24px rgba(15, 23, 42, .1); background: #f8fafc; }
.help-shot img { display: block; width: 100%; height: auto; }

.help-steps { padding-inline-start: 0; margin: 1.25rem 0 .5rem; list-style: none; counter-reset: step; }
.help-steps li { counter-increment: step; position: relative; padding-inline-start: 2.6rem; margin: 0 0 .85rem; line-height: 1.65; min-height: 1.9rem; }
.help-steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: .1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--help-accent); color: #fff; font-size: .82rem; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.help-tip { background: #ecfdf5; border-inline-start: 4px solid var(--help-accent); padding: .8rem 1.1rem; border-radius: .5rem; margin: 1.1rem 0 .25rem; font-size: .96rem; line-height: 1.6; }

/* ---- Plan table ---- */
.help-matrix { margin: 1rem 0; font-size: .93rem; }
.help-matrix th { background: var(--help-navy); color: #fff; font-weight: 600; padding: .7rem .85rem; vertical-align: middle; }
.help-matrix td { padding: .65rem .85rem; vertical-align: middle; }
.help-matrix tbody tr:nth-child(even) { background: #f8fafc; }
.help-matrix td.yes { color: #059669; font-weight: 700; text-align: center; font-size: 1.05rem; }
.help-matrix td.no { color: #cbd5e1; text-align: center; }

mark.help-hit { background: #fde68a; color: inherit; padding: 0 .1em; border-radius: .2em; }
.help-screen[hidden], .help-chapter[hidden], .help-toc [hidden] { display: none !important; }

/* ---- Website: the guide sits under a sticky menu and needs more room than an article column ---- */
.help-page { --help-offset: 5.25rem; max-width: 1280px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.help-page .help { --help-offset: 5.25rem; }

@media (max-width: 991.98px) {
  .help-head { padding: 1.25rem 1.25rem; }
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .help-toc { position: static; max-height: 15rem; }
  .help-screen { padding: 1.25rem 1.1rem; }
  .help-page { padding: 1.5rem 1rem 3rem; }
}
@media print { .no-print, .help-toc { display: none !important; } .help-layout { display: block; } .help-screen { break-inside: avoid; box-shadow: none; } .help-head { background: none; border: 0; padding: 0; } }

/* Search box details: our own Clear button replaces the browser's "x". */
#helpSearch::-webkit-search-cancel-button { display: none; }
@media (max-width: 575.98px) {
  .help-search .form-control { padding-inline-end: 1rem; font-size: .95rem; }
  .help-count { display: none; }
  .help-search #helpClear { inset-inline-end: .75rem; }
}
