/* =========================================================
   SarkariHelper — shared stylesheet
   Mobile-first, plain CSS3. Used by every page.
   ========================================================= */

:root {
  --blue: #0b57d0;
  --blue-dark: #083f96;
  --blue-soft: #eaf1ff;
  --blue-line: #c7d9f7;
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #5b6779;
  --line: #dbe3ef;
  --bg: #f5f8ff;
  --white: #ffffff;
  --green: #0f7b4f;
  --green-soft: #e7f6ee;
  --red: #b42318;
  --red-soft: #feeceb;
  --amber-soft: #fff6e5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* `hidden` must win over the display rules used by status banners and previews. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

img, canvas { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding-left: 1.15rem; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid #94b6f0;
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-text em { font-style: normal; color: var(--blue); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 4px;
  overflow: visible;
  font-size: .875rem;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.site-nav a.is-active { background: var(--blue-soft); color: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 320px at 85% -10%, #dbe8ff 0%, rgba(219, 232, 255, 0) 70%),
    linear-gradient(180deg, var(--bg), var(--white));
  padding: 32px 0 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--blue-line);
  color: var(--blue-dark);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.hero h1 { max-width: 18ch; }
.hero .accent { color: var(--blue); }

.hero-sub {
  max-width: 60ch;
  color: var(--muted);
  font-size: .975rem;
  margin-bottom: 14px;
}

.hero-chips {
  display: grid;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .875rem;
  color: var(--ink-soft);
}
.hero-chips li {
  position: relative;
  padding-left: 22px;
}
.hero-chips li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ---------- Section scaffolding ---------- */
.section { padding: 28px 0; }
.section-alt { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title { margin-bottom: 6px; }
.section-sub { color: var(--muted); font-size: .95rem; max-width: 62ch; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
}

.tool-card { padding: 18px 14px; }

.card-head { margin-bottom: 14px; }
.card-head h2 { margin-bottom: 2px; }
.card-head p { margin: 0; color: var(--muted); font-size: .875rem; }

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  border: 2px dashed var(--blue-line);
  border-radius: var(--radius);
  background: #fbfdff;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.dropzone:hover { border-color: var(--blue); background: var(--blue-soft); }
.dropzone.is-drag { border-color: var(--blue); background: var(--blue-soft); transform: scale(.995); }

.dz-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.dz-title { font-weight: 700; font-size: .975rem; }
.dz-sub { color: var(--muted); font-size: .8rem; }

.dz-cta {
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}

/* ---------- Messages ---------- */
.error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  border: 1px solid #fbd3d0;
  color: var(--red);
  font-size: .875rem;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .875rem;
  font-weight: 600;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #b9d0f5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 2.4s; }
}

/* ---------- Target controls ---------- */
.target-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.target-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.target-head h3 { margin: 0 0 8px; }

.target-live {
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset {
  padding: 11px 8px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.preset:hover { border-color: var(--blue); color: var(--blue-dark); }
.preset.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.custom-row { margin-top: 14px; }
.custom-row > label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }

.custom-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 0 12px;
  max-width: 220px;
}
.custom-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 87, 208, .12); }

.custom-input input {
  border: 0;
  outline: none;
  width: 100%;
  padding: 11px 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
}
.custom-input span { color: var(--muted); font-size: .875rem; font-weight: 700; }

.hint { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.hint.center { text-align: center; }

/* ---------- Results ---------- */
.results {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.preview {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}

/* Image area of the card: the result sits at its real pixel size, centred. */
.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 10px;
  background-color: #f2f5fa;
}
.preview-comp .preview-stage { background-color: #eef2f8; }

.preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 120px;
  margin: auto;
  object-fit: contain;
  background-color: #f2f5fa;
  background-image:
    linear-gradient(45deg, #e7edf7 25%, transparent 25%, transparent 75%, #e7edf7 75%),
    linear-gradient(45deg, #e7edf7 25%, transparent 25%, transparent 75%, #e7edf7 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}

.preview-comp img { background-image: none; background-color: #eef2f8; }

.preview figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}
.preview figcaption strong { font-size: .95rem; }
.preview .dim { flex: 1 1 100%; color: var(--muted); font-size: .72rem; }

.tag {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #eef1f6;
  border-radius: 5px;
  padding: 2px 6px;
}
.tag-green { color: var(--green); background: var(--green-soft); }

.result-meta {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .82rem;
}
.result-meta.is-warn { background: var(--amber-soft); border-color: #f3dcb0; color: #8a5300; }

.actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

.btn-ghost {
  background: var(--white);
  border-color: var(--blue-line);
  color: var(--blue-dark);
}
.btn-ghost:hover { background: var(--blue-soft); }

.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.step .step-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: .875rem; }

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}

.req-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: .85rem;
}

.req-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px;
  font-size: .78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.req-table th,
.req-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.req-table thead th {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.req-table tbody th { font-weight: 700; }
.req-table tbody tr:last-child th,
.req-table tbody tr:last-child td { border-bottom: 0; }
.req-table tbody tr:nth-child(even) { background: #fbfcff; }

.muted { color: var(--muted); font-weight: 500; font-size: .78rem; }

.disclaimer {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--white);
  color: var(--ink-soft);
  font-size: .82rem;
}
.disclaimer strong { color: var(--ink); }

/* ---------- Inner pages ---------- */
.page-head {
  background: linear-gradient(180deg, var(--bg), var(--white));
  border-bottom: 1px solid var(--line);
  padding: 26px 0 22px;
}
.page-head h1 { margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 65ch; }

.legal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
}

.legal h2 {
  font-size: 1.15rem;
  margin-top: 1.6em;
  padding-top: .2em;
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1rem; margin-top: 1.3em; }
.legal p, .legal li { color: var(--ink-soft); font-size: .925rem; }
.legal ul, .legal ol { padding-left: 1.2rem; }
.legal li { margin-bottom: .45em; }

.legal .updated {
  display: inline-block;
  margin-bottom: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.callout {
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  border: 1px solid #c9e9d8;
}
.callout strong { color: var(--green); }
.callout p:last-child { margin-bottom: 0; }
.callout-blue { background: var(--blue-soft); border-color: var(--blue-line); }
.callout-blue strong { color: var(--blue-dark); }

.contact-card {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--blue-soft);
}
.contact-card .label {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.contact-card .mail {
  font-size: 1.05rem;
  font-weight: 700;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 10px;
  background: #0d1b33;
  color: #c8d4e8;
  padding: 26px 0 18px;
}

.footer-grid {
  display: grid;
  gap: 20px;
}

.footer-brand .brand { color: #fff; }
.footer-brand .brand-text em { color: #7fb0ff; }
.footer-brand p {
  margin: 10px 0 0;
  color: #a9b8d0;
  font-size: .85rem;
  max-width: 42ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-links h2 {
  margin: 0 0 2px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7f90ad;
}
.footer-links a { color: #dbe5f5; font-size: .875rem; }
.footer-links a:hover { color: #fff; }

.footer-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #1e2f4d;
  font-size: .75rem;
  color: #93a3bd;
}
.footer-note p { margin: 0 0 4px; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.1rem; }
  .hero { padding: 44px 0 36px; }
  .hero-chips { display: flex; flex-wrap: wrap; gap: 8px 22px; }
  .tool-card { padding: 24px; }
  .preview-stage { min-height: 132px; }
  .preview img { max-height: 180px; }
  .actions { grid-template-columns: 1.4fr 1fr; }
  .custom-input { max-width: 260px; }
  .legal { padding: 28px 26px; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .header-inner { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { width: auto; margin-left: auto; gap: 6px; }
  .hero h1 { font-size: 2.4rem; max-width: 24ch; }
  .hero-sub { font-size: 1.05rem; }
  .preview-stage { min-height: 168px; }
  .preview img { max-height: 220px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
  .section { padding: 40px 0; }
}

/* =========================================================
   Tool pages — resize & signature controls
   ========================================================= */

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.field { display: grid; gap: 6px; }
.field > label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }

.control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.control:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 87, 208, .12); }
.control.is-disabled { opacity: .55; background: var(--bg); }

.control input,
.control select {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 11px 0;
  font-size: 1rem;
  font-weight: 600;
}
.control select { cursor: pointer; }
.control .suffix {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.segmented {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.segmented button {
  flex: 1;
  padding: 8px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.segmented button:hover { color: var(--blue-dark); }
.segmented button.is-active { background: var(--blue); color: #fff; }

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-card {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}
.preset-card:hover { border-color: var(--blue); background: var(--blue-soft); }
.preset-card b { font-size: .8rem; line-height: 1.3; color: var(--ink); }
.preset-card span { font-size: .72rem; color: var(--muted); }
.preset-card.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.preset-card.is-active b { color: var(--blue-dark); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
}
.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}
.check-row label { flex: 1; cursor: pointer; }
.check-row b { display: block; font-size: .85rem; line-height: 1.35; }
.check-row .hint { margin: 2px 0 0; }

@media (min-width: 640px) {
  .preset-grid { grid-template-columns: repeat(3, 1fr); }
  .field-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   Passport photo maker — live output + crop sliders
   ========================================================= */

.pp-live {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: #eef2f8;
}

.pp-live canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 300px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 6px 18px rgba(16, 24, 40, .08);
}

.range-field { display: grid; gap: 2px; margin-top: 12px; }

.range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.range-head span { color: var(--blue-dark); font-size: .78rem; }

.range-field input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

@media (min-width: 640px) {
  .pp-live canvas { max-height: 380px; }
  .range-field { margin-top: 14px; }
}

@media (min-width: 860px) {
  .pp-live canvas { max-height: 520px; }
}

/* =========================================================
   Navigation — header dropdowns (<details> + nav.js)
   ========================================================= */

.nav-drop { position: relative; flex: 0 0 auto; }

.nav-drop summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-top: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.nav-drop summary:hover,
.nav-drop[open] summary { background: var(--blue-soft); color: var(--blue-dark); }
.nav-drop.is-section summary {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px var(--blue-line);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 226px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 10px 28px rgba(16, 24, 40, .14);
}

.site-nav .nav-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .85rem;
  white-space: normal;
}

/* =========================================================
   PDF tools — page list, page grid
   ========================================================= */

.file-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
}

.file-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
}

.file-thumb {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef2f8;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }

.file-num {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 5px;
  border-bottom-right-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  line-height: 1.6;
}

.file-info { min-width: 0; }
.file-name {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta { display: block; color: var(--muted); font-size: .72rem; }

.file-actions { display: flex; gap: 4px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.icon-btn:disabled { opacity: .38; cursor: not-allowed; }
.icon-btn.is-danger:hover:not(:disabled) { border-color: #f3b7b1; background: var(--red-soft); color: var(--red); }

.empty-note {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

.field-label {
  display: block;
  margin: 14px 0 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.btn-block { width: 100%; margin-top: 16px; }
.btn-sm { padding: 8px 10px; font-size: .78rem; border-radius: 8px; }

.segmented.is-disabled { opacity: .5; }
.segmented button:disabled { cursor: not-allowed; }

.pdf-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
}
.pdf-file .file-info { flex: 1; }
.pdf-file .file-name { color: var(--ink); }

.pdf-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--blue-line);
  background: var(--white);
  color: var(--blue-dark);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.pdf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pdf-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}
.pdf-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.414;
  object-fit: contain;
  background-color: #eef2f8;
}
.pdf-card-body {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}
.pdf-card-body b { font-size: .82rem; }

@media (min-width: 640px) {
  .pdf-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  .pdf-grid { grid-template-columns: repeat(4, 1fr); }
}

/* The right-hand dropdown opens towards the page edge so it never leaves the screen. */
.nav-drop.is-right .nav-menu { left: auto; right: 0; }

/* Tighter header on phones: the two tool groups still fit on two neat rows. */
@media (max-width: 639px) {
  .header-inner { gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
  .site-nav { gap: 2px; }
  .site-nav a,
  .nav-drop summary { padding: 5px 9px; }
  .nav-menu { max-width: calc(100vw - 24px); }
}

/* =========================================================
   Phase 2 tools — size comparison, card pickers, page tiles
   ========================================================= */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.compare-box {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
}
.compare-box span {
  display: block;
  margin-bottom: 2px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare-box b { font-size: 1.05rem; }
.compare-box.is-good { background: var(--green-soft); border-color: #c9e9d8; }
.compare-box.is-good b { color: var(--green); }

/* Aadhaar / PAN front & back pickers */
.pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pick {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.586 / 1;
  padding: 8px;
  border: 2px dashed var(--blue-line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}
.pick:hover { border-color: var(--blue); background: var(--blue-soft); }
.pick.has-img { border-style: solid; border-color: var(--line); background: #eef2f8; }

.pick-img { width: 100%; height: 100%; object-fit: contain; }

.pick-empty { display: grid; justify-items: center; gap: 1px; }
.pick-empty b { font-size: .8rem; line-height: 1.3; }
.pick-empty span { font-size: .68rem; color: var(--muted); }
.pick-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 800;
}

.pick-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pick.has-img .pick-tag { background: rgba(16, 24, 40, .8); }

/* Split PDF page tiles */
.page-num {
  display: grid;
  place-items: center;
  min-height: 84px;
  background: #eef2f8;
  color: var(--blue-dark);
  font-size: 1.3rem;
  font-weight: 800;
}
.page-num small {
  display: block;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.range-block { margin-top: 12px; }
.range-block .custom-input { max-width: none; }

.hint.is-bad { color: var(--red); font-weight: 700; }

@media (min-width: 640px) {
  .page-num { min-height: 112px; }
  .pick-empty b { font-size: .9rem; }
}

/* =========================================================
   Phase 3 — exam tool engine, guide blocks, card grids
   ========================================================= */

/* Exam tool: photo / signature tabs */
.et-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.et-tab {
  flex: 1;
  padding: 10px 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.et-tab:hover { color: var(--blue-dark); }
.et-tab.is-active { background: var(--blue); color: #fff; }

.et-spec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.45;
}
.et-spec b { font-weight: 800; }
.et-spec .et-sep { color: #8fb1e6; }

.et-strip-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}
.et-strip-fields .field > label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }

/* Exam FAQ accordion */
.faq { display: grid; gap: 8px; margin-top: 16px; }

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.faq details[open] { border-color: var(--blue-line); }

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
  line-height: 1.2;
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--blue-dark); }
.faq p { margin: 10px 0 0; color: var(--ink-soft); font-size: .875rem; }
.faq p:last-child { margin-bottom: 0; }

/* Internal link cards */
.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.link-card {
  display: grid;
  gap: 2px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.link-card:hover { border-color: var(--blue); background: #fbfdff; text-decoration: none; }
.link-card b { font-size: .85rem; line-height: 1.35; }
.link-card span { font-size: .72rem; color: var(--muted); line-height: 1.4; }

/* Homepage tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.tool-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.tool-tile:hover { border-color: var(--blue); background: #fbfdff; text-decoration: none; }

.tool-tile .tile-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.tool-tile b { display: block; font-size: .83rem; line-height: 1.3; }
.tool-tile .tip { display: block; font-size: .7rem; color: var(--muted); line-height: 1.35; }

/* Homepage exam grid */
.exam-grid { display: grid; gap: 8px; margin-top: 16px; }

.exam-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.exam-card:hover { border-color: var(--blue); background: #fbfdff; text-decoration: none; }

.exam-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-line);
  color: var(--blue-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.exam-card b { display: block; font-size: .9rem; line-height: 1.35; }
.exam-card .exam-meta { display: block; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.exam-card .exam-go { color: var(--blue); font-size: .95rem; font-weight: 800; }

/* The exam tab in the header stays highlighted on exam guide pages. */
.nav-drop.is-current summary {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px var(--blue-line);
}

/* Below 860 px the nav wraps, so dropdowns cannot anchor to their own edge:
   each menu becomes a panel spanning the nav instead. */
@media (max-width: 859px) {
  .site-nav { position: relative; }
  .nav-drop { position: static; }
  .site-nav .nav-drop .nav-menu {
    top: calc(100% + 16px);
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 32px));
    min-width: 0;
    max-width: none;
    max-height: 70vh;
    overflow-y: auto;
  }
}

@media (min-width: 640px) {
  .link-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .exam-grid { grid-template-columns: 1fr 1fr; }
  .et-strip-fields { grid-template-columns: 1.4fr 1fr; }
  .et-tab { font-size: .875rem; }
}

@media (min-width: 860px) {
  .tool-grid { grid-template-columns: repeat(5, 1fr); }
  .link-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================
   Phase 4 — Hindi pages, blog hub, articles
   ========================================================= */

/* Blog hub cards */
.blog-grid { display: grid; gap: 12px; margin-top: 18px; }

.blog-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.blog-card:hover { border-color: var(--blue); text-decoration: none; }

.blog-badge {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.blog-card h3 { margin: 2px 0 0; font-size: 1rem; line-height: 1.35; }
.blog-card p { margin: 0; color: var(--muted); font-size: .85rem; }

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
}

/* Article pages */
.article { max-width: 780px; }
.article h2 { margin-top: 1.7em; font-size: 1.22rem; }
.article h3 { margin-top: 1.4em; font-size: 1.02rem; }
.article p { color: var(--ink-soft); font-size: .95rem; }
.article .lead { color: var(--ink); font-size: 1.02rem; }
.article ul, .article ol { color: var(--ink-soft); font-size: .94rem; padding-left: 1.25rem; }
.article li { margin-bottom: .55em; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}

.article-tip {
  margin: 16px 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg);
  font-size: .875rem;
  color: var(--ink-soft);
}
.article-tip strong { color: var(--ink); }

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   Phase 6 — age calculator, image converter, PDF numbering, QR
   ========================================================= */

/* The calculated age sits above the small statistics. */
.age-hero {
  margin-top: 14px;
  padding: 16px 14px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--blue-soft);
  text-align: center;
}
.age-hero strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.age-hero span {
  display: block;
  margin-top: 4px;
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
}
.stat span {
  display: block;
  margin-bottom: 2px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat b { font-size: 1.05rem; }

/* Eligibility answer: green when inside the age window, red when outside. */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  font-size: .875rem;
  color: var(--ink-soft);
}
.verdict strong { display: block; margin-bottom: 2px; font-size: .95rem; }
.verdict.is-ok { background: var(--green-soft); border-color: #c9e9d8; }
.verdict.is-ok strong { color: var(--green); }
.verdict.is-bad { background: var(--red-soft); border-color: #f3b7b1; }
.verdict.is-bad strong { color: var(--red); }

/* QR colour pickers */
.swatch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
}
.swatch input[type="color"] {
  width: 38px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
}
.swatch span { font-size: .78rem; font-weight: 700; color: var(--ink-soft); }

/* Live QR preview */
.qr-stage {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2f8;
}
.qr-stage canvas {
  width: min(100%, 240px);
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.qr-stage .empty-note { margin: 0; }

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .age-hero strong { font-size: 1.55rem; }
}

/* ---------- Contact form ---------- */
.contact-form {
  display: grid;
  gap: 14px;
  margin: 16px 0 8px;
}
.contact-form .field-grid { grid-template-columns: 1fr; }
.control textarea {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
}
.control-area { align-items: stretch; padding: 4px 12px; }
.control-area textarea { min-height: 132px; }
.field.is-invalid .control {
  border-color: var(--red);
  background: var(--red-soft);
}
.field.is-invalid > label { color: var(--red); }
.form-error {
  margin: 0;
  color: var(--red);
  font-size: .78rem;
  font-weight: 600;
}
.form-done {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #bfe5cf;
  border-radius: var(--radius);
  background: #f1faf4;
}
.form-done p:last-of-type { margin-bottom: 8px; }

/* =========================================================
   AdSense slots — hidden until ads are activated
   Zero CLS by design: while display is none these blocks take
   no space, so switching an ad unit on later cannot shift the
   page. To activate, replace the commented placeholder in the
   page with <div class="ad-slot-banner"> … </div> or
   <div class="ad-slot-rectangle"> … </div> and change
   display: none below to display: block.
   ========================================================= */
.ad-slot-banner,
.ad-slot-rectangle {
  display: none;
  margin: 22px auto;
  max-width: 100%;
  overflow: hidden;
}
.ad-slot-banner { min-height: 100px; }
.ad-slot-rectangle { min-height: 250px; max-width: 336px; }

@media (min-width: 640px) {
  .contact-form .field-grid { grid-template-columns: repeat(2, 1fr); }
}

