/* Help panel for Aadhaar Daily Check. Uses the page's own CSS variables. */

/* keep the page header clear of the fixed "?" button */
body > header { padding-right: 72px; }

/* ---------- "?" button ---------- */
.hp-fab {
  position: fixed; top: 12px; right: 16px; z-index: 1000;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--accent); color: #fff; border: 2px solid #fff;
  font: 700 20px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer; box-shadow: 0 2px 8px rgba(20, 30, 50, .28);
  display: flex; align-items: center; justify-content: center;
}
.hp-fab:hover { filter: brightness(1.1); }
.hp-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- overlay + sheet ---------- */
.hp-backdrop {
  position: fixed; inset: 0; z-index: 1100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(15, 20, 28, .58);
}
.hp-backdrop.hp-open { display: flex; }
.hp-sheet {
  display: flex; flex-direction: column; width: min(980px, 100%); height: min(100%, 900px);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(10, 15, 25, .35); overflow: hidden;
}
.hp-sheet:focus { outline: none; }
.hp-sheet *, .hp-lb * { box-sizing: border-box; }
.hp-sheet[lang="mr"] { line-height: 1.7; }

.hp-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px 10px 18px; background: var(--card); border-bottom: 1px solid var(--line);
}
.hp-sheet .hp-title { margin: 0; font-size: 18px; flex: 1 1 auto; }
.hp-seg { display: inline-flex; border: 1px solid #c5ced8; border-radius: 8px; overflow: hidden; background: #fff; }
.hp-sheet .hp-seg button {
  border: 0; border-radius: 0; padding: 7px 14px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; cursor: pointer;
}
.hp-sheet .hp-seg button + button { border-left: 1px solid #c5ced8; }
.hp-sheet .hp-seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.hp-sheet .hp-close {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid #c5ced8;
  background: #fff; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer;
}
.hp-sheet .hp-close:hover { background: var(--bg); }
.hp-sheet button:focus-visible, .hp-sheet a:focus-visible, .hp-sheet summary:focus-visible,
.hp-lb button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hp-body { position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 36px; }
@media (prefers-reduced-motion: no-preference) { .hp-body { scroll-behavior: smooth; } }
.hp-wrap { max-width: 820px; margin: 0 auto; }
.hp-intro { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* ---------- table of contents ---------- */
.hp-toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.hp-toc-h { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hp-sheet[lang="mr"] .hp-toc-h { text-transform: none; letter-spacing: 0; }
.hp-toc ul { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 24px; }
.hp-toc li { break-inside: avoid; padding: 3px 0; }
.hp-toc a { color: var(--accent); text-decoration: none; }
.hp-toc a:hover { text-decoration: underline; }
.hp-toc a { display: flex; align-items: baseline; gap: 8px; }
.hp-toc .hp-toc-num { flex: 0 0 22px; height: 22px; border-radius: 50%; background: #eef1f5; color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hp-toc .hp-toc-txt { flex: 1; }
.hp-toc .hp-toc-step { color: var(--muted); font-size: 12px; font-weight: 600; }

/* ---------- sections ---------- */
.hp-sec { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 14px 0; scroll-margin-top: 4px; }
.hp-sec:focus { outline: none; }
.hp-sheet .hp-sec h3 { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hp-stepbadge {
  display: inline-block; background: var(--accent); color: #fff; border-radius: 10px;
  padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.hp-sec p { margin: 8px 0; }
.hp-sec ul { margin: 8px 0; padding-left: 22px; }
.hp-sec li { margin: 4px 0; }
.hp-lbl { background: #eef1f5; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-weight: 600; white-space: normal; }
.hp-sub { margin: 14px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.hp-top { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--muted); text-decoration: none; }
.hp-top:hover { color: var(--accent); text-decoration: underline; }

/* numbered steps */
.hp-steps { counter-reset: hps; list-style: none; margin: 8px 0; padding: 0; }
.hp-steps > li { counter-increment: hps; position: relative; padding: 4px 0 4px 36px; margin: 6px 0; }
.hp-steps > li::before {
  content: counter(hps); position: absolute; left: 0; top: 4px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.hp-sheet[lang="mr"] .hp-steps > li::before { top: 6px; }
.hp-steps ul { margin-top: 4px; }

/* call-outs */
.hp-callout { border: 1px solid #bcd0f2; background: #eef4ff; border-radius: 10px; padding: 9px 13px; margin: 10px 0; }
.hp-callout.hp-warn { border-color: #f0d48a; background: #fff6e0; }
.hp-callout.hp-good { border-color: #b6dbb9; background: #e2f3e4; }
.hp-callout > :first-child { margin-top: 0; }
.hp-callout > :last-child { margin-bottom: 0; }

/* number cards explained */
.hp-metrics { margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.hp-metric { margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; background: var(--bg); }
.hp-metric.green { border-left-color: var(--green); }
.hp-metric.red { border-left-color: var(--red); }
.hp-metric.amber { border-left-color: var(--amber); }
.hp-metric dt { font-weight: 700; }
.hp-metric dd { margin: 2px 0 0; }

/* pictures */
.hp-fig { margin: 12px 0; }
.hp-sheet .hp-zoom {
  display: block; width: 100%; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #fff; cursor: zoom-in; position: relative;
}
.hp-zoom img { display: block; width: 100%; max-width: 100%; height: auto; }
.hp-zoom.hp-crop-top img { aspect-ratio: 1170 / 250; object-fit: cover; object-position: top; }
.hp-zoom.hp-crop-bottom img { aspect-ratio: 1170 / 380; object-fit: cover; object-position: bottom; }
.hp-zoom::after {
  content: "\2922"; position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(27, 31, 36, .72); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.hp-fig figcaption { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.hp-figs-excel .hp-zoom { max-width: 460px; }

/* questions */
.hp-sec details { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); margin: 8px 0; }
.hp-sec summary { cursor: pointer; padding: 9px 12px; font-weight: 600; }
.hp-sec details > div { padding: 0 12px 10px; }
.hp-sec details > div p { margin: 0; }

/* ---------- lightbox ---------- */
.hp-lb { position: absolute; inset: 0; z-index: 2; display: none; flex-direction: column; background: rgba(10, 14, 20, .92); }
.hp-lb.hp-open { display: flex; }
.hp-lb .hp-lb-close {
  position: absolute; top: 12px; right: 16px; z-index: 3; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 2px solid #fff; background: rgba(27, 31, 36, .85); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.hp-lb-scroll { flex: 1 1 auto; overflow: auto; display: flex; padding: 60px 16px 16px; cursor: zoom-out; }
.hp-lb-scroll img { margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; background: #fff; }
.hp-lb-cap { flex: 0 0 auto; padding: 0 60px 12px 16px; color: #dfe5ec; font-size: 13px; text-align: center; }

/* ---------- phones ---------- */
@media (max-width: 700px) {
  .hp-backdrop { padding: 0; }
  .hp-sheet { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .hp-head { padding: 8px 10px 8px 14px; gap: 8px; }
  .hp-sheet .hp-title { font-size: 17px; }
  .hp-body { padding: 12px 12px 32px; }
  .hp-sec { padding: 14px 13px; }
  .hp-toc ul { columns: 1; }
  .hp-lb-scroll img { max-width: none; max-height: none; width: 900px; }
  .hp-lb-cap { padding-right: 16px; }
  .hp-figs-excel .hp-zoom { max-width: none; }
}
