:root {
  --ink: #12324a;
  --muted: #3e6480;
  --paper: #c5e6f6;
  --card: #ffffff;
  --line: #9ecae4;
  --teal: #1c6cb8;
  --teal-dark: #14528c;
  --sand: #f0c44a;
  --danger: #9d2c2c;
  --shadow: 0 18px 40px rgba(18, 50, 74, 0.08);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Outfit, "Noto Sans Devanagari", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -8%, rgba(255, 255, 255, 0.55), transparent 46%),
    radial-gradient(720px 380px at 0% 0%, rgba(28, 108, 184, 0.16), transparent 52%),
    linear-gradient(180deg, #d7f0fb 0%, var(--paper) 42%, #b7dff2 100%);
  line-height: 1.55;
  font-size: 17px;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; font-size: 16px; color: inherit; }
a { color: var(--teal-dark); }
h1, h2, h3 {
  font-family: Outfit, "Noto Sans Devanagari", "Segoe UI", sans-serif;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3 { font-family: "Noto Sans Devanagari", Outfit, sans-serif; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 0;
  background: rgba(197, 230, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap, .site-header { }
.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}
.logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: none;
}
.site-footer .logo img { height: 64px; }
.desk-nav { display: none; gap: 18px; }
.desk-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
select.tiny, .header-tools select {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 10px;
}
.menu-btn {
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 14px;
  font-weight: 650;
}
.mobile-nav {
  border-bottom: 1px solid var(--line);
  background: white;
}
.mobile-nav a {
  display: block;
  padding: 14px 20px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-top: 1px solid var(--line);
}

.hero, .panel, .workspace, .prose, .price-card, .guide-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero {
  margin: 12px 0 28px;
  padding: 28px 22px 24px;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(240, 196, 74, 0.45), transparent 62%),
    radial-gradient(420px 180px at 0% 100%, rgba(28, 108, 184, 0.14), transparent 55%),
    white;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 4.4rem); margin: 0 0 12px; max-width: 14ch; }
.lede, .hero p { color: var(--muted); font-size: 1.05rem; }
.hero-actions, .actions, .result { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
  background: white;
}
.btn.primary { background: var(--teal); color: white; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.secondary, .btn.ghost { border-color: var(--line); color: var(--ink); background: white; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 8px 14px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.header-cta { display: none; }

.search { margin: 8px 0 22px; }
.search input, .field input, .field select, .field textarea, .contact input, .contact textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px 12px;
}
textarea { min-height: 140px; resize: vertical; }
.tool-group { margin: 0 0 26px; }
.tool-group h2 { font-size: 1.7rem; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tool-card, .guide-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}
.tool-card:hover, .guide-card:hover { border-color: #7eb6dc; transform: translateY(-2px); }
.icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e5f3fb;
  color: var(--teal-dark);
}
.tool-card h3, .guide-card h2, .guide-card h3 { margin: 0; font-size: 1.2rem; }
.tool-card p, .guide-card p { margin: 0; color: var(--muted); }
.steps { display: grid; gap: 12px; margin: 10px 0 28px; }
.step { padding: 16px; border-left: 4px solid var(--sand); background: white; border-radius: 16px; }
.step h3 { margin: 0 0 6px; }
.faq details, .prose details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 8px 0;
}
.faq summary, .prose summary { cursor: pointer; font-weight: 700; }
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 8px; }
.crumbs { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.crumbs a { color: inherit; }
.workspace { padding: 16px; margin: 12px 0 20px; }
.drop {
  position: relative;
  min-height: 210px;
  border: 1.5px dashed #8eb8d4;
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  background: #f4faff;
}
.drop input.file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop.is-hot { background: #e5f3fb; }
.drop:focus-within { box-shadow: 0 0 0 4px rgba(28, 108, 184, 0.18); }
.drop-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.drop-sub { margin: 4px 0 10px; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.file-list li, .thumbs li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.file-list small { display: block; color: var(--muted); }
.file-list button, .thumb-actions button {
  min-height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.options, .extra { display: grid; gap: 12px; margin-top: 14px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 0.95rem; }
.choice-row, .crop-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size-row { display: flex; gap: 8px; }
.size-row input { flex: 1; width: auto; }
.size-row select { width: 96px; }
.crop-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}
.help, .privacy, .status { color: var(--muted); font-size: 0.95rem; }
.status[data-kind="error"] { color: var(--danger); }
.bar { height: 8px; background: #d5e8f5; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar span { display: block; height: 100%; width: 0; background: var(--teal); }
.sample { margin-top: 10px; }
#sign-pad, #redact-canvas, .compare canvas {
  width: 100%;
  height: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  touch-action: none;
}
.thumbs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.thumbs img { width: 72px; height: auto; border-radius: 6px; background: white; }
.thumbs li { align-items: center; }
.thumb-actions { display: flex; gap: 6px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.compare { display: grid; gap: 10px; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.viewer-bar button {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.workspace:fullscreen,
.workspace:-webkit-full-screen {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--paper);
  padding: 16px 18px 28px;
}
.workspace:fullscreen .viewer-scroll,
.workspace:fullscreen .doc-view,
.workspace:fullscreen .editor-stage,
.workspace:-webkit-full-screen .viewer-scroll,
.workspace:-webkit-full-screen .doc-view,
.workspace:-webkit-full-screen .editor-stage {
  max-height: calc(100vh - 220px);
}
.workspace:fullscreen .editor-bar,
.workspace:-webkit-full-screen .editor-bar {
  top: 0;
}
.editor { display: grid; gap: 8px; }
.editor[hidden] { display: none; }
.editor:fullscreen,
.editor:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  gap: 8px;
  margin: 0;
  padding: 12px;
  background: var(--paper);
  overflow: hidden;
}
.editor:fullscreen .editor-bar,
.editor:-webkit-full-screen .editor-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--paper);
}
.editor:fullscreen .editor-stage,
.editor:-webkit-full-screen .editor-stage {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.editor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: 72px;
  z-index: 3;
  background: var(--paper);
  padding: 8px 0;
}
.editor-bar button, .editor-bar input {
  min-height: 40px;
}
.editor-bar button {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.editor-bar button[aria-pressed="true"] {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.editor-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}
.editor-stage {
  max-height: min(78vh, 920px);
  overflow: auto;
  background: #d7ebf6;
  border-radius: 16px;
  padding: 12px;
}
.editor-sheet { position: relative; width: fit-content; margin: 0 auto; }
.editor-sheet canvas {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  background: white;
  box-shadow: 0 8px 24px rgba(23, 50, 77, 0.12);
  touch-action: none;
}
.editor-input {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: #fff;
  color: #1a242e;
  caret-color: auto;
  font-family: Helvetica, Arial, sans-serif;
  white-space: pre;
  overflow: hidden;
}
.editor-note[hidden] { display: none; }
.viewer-stage { display: grid; gap: 8px; }
.viewer-stage[hidden] { display: none; }
.viewer-stage:fullscreen,
.viewer-stage:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  gap: 8px;
  margin: 0;
  padding: 12px;
  background: var(--paper);
  overflow: hidden;
}
.viewer-stage:fullscreen .viewer-bar,
.viewer-stage:-webkit-full-screen .viewer-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
}
.viewer-stage:fullscreen .viewer-scroll,
.viewer-stage:-webkit-full-screen .viewer-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.viewer-scroll {
  max-height: min(78vh, 920px);
  overflow: auto;
  background: #d7ebf6;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
  justify-items: center;
  touch-action: pan-x pan-y;
}
.viewer-page { margin: 0; }
.viewer-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 35, 44, 0.12);
}
.viewer-page figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.doc-stage { display: grid; gap: 8px; }
.doc-stage[hidden] { display: none; }
.doc-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-bar button {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.doc-bar button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.doc-stage:fullscreen,
.doc-stage:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  gap: 8px;
  margin: 0;
  padding: 12px;
  background: var(--paper);
  overflow: hidden;
}
.doc-stage:fullscreen .doc-bar,
.doc-stage:-webkit-full-screen .doc-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
}
.doc-stage:fullscreen .doc-view,
.doc-stage:-webkit-full-screen .doc-view {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.doc-stage.is-reading,
.doc-stage.is-reading:fullscreen,
.doc-stage.is-reading:-webkit-full-screen {
  background: #1c1915;
}
.doc-stage.is-reading .doc-bar,
.doc-stage.is-reading:fullscreen .doc-bar,
.doc-stage.is-reading:-webkit-full-screen .doc-bar {
  background: #1c1915;
}
.doc-stage.is-reading .doc-bar button {
  background: #2a261f;
  color: #f3efe6;
  border-color: #4a4338;
}
.doc-stage.is-reading .doc-bar button[aria-pressed="true"] {
  background: #f3efe6;
  color: #1c1915;
  border-color: #f3efe6;
}
.doc-view {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 16px 28px;
  max-height: min(78vh, 920px);
  overflow: auto;
}
.doc-view.is-reading {
  background: #1c1915;
  color: #f3efe6;
  border-color: #3a342c;
}
.doc-view.is-reading h1,
.doc-view.is-reading h2,
.doc-view.is-reading h3 { color: #fffaf3; }
.doc-view h1, .doc-view h2, .doc-view h3 { margin: 0.7em 0 0.25em; }
.doc-view p { margin: 0.4em 0; }
.doc-view img { display: block; max-width: 100%; height: auto; margin: 10px 0; }
.doc-view .is-italic { font-style: italic; }
.prose { padding: 18px 16px 8px; margin-bottom: 28px; }
.prose h2 { font-size: 1.6rem; }
.related { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.related a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  background: #f3f9fd;
}
.prices { display: grid; gap: 14px; margin: 12px 0 28px; }
.price-card { padding: 20px; }
.price-card strong { font-size: 2rem; font-family: Outfit, "Segoe UI", sans-serif; }
.price-card ul { padding-left: 18px; }
.price-card.featured { border-color: var(--sand); background: #fff9ea; }
.contact { display: grid; gap: 12px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 28px 0 40px; color: var(--muted); }
.visit-count { width: min(1120px, calc(100% - 32px)); margin: 18px auto 0; }
.visit-count img { display: block; width: 88px; height: 31px; }
.foot-grid { display: grid; gap: 18px; }
.site-footer a { color: var(--ink); text-decoration: none; display: inline-block; margin: 4px 8px 4px 0; }
.site-footer h2 { font-size: 1rem; margin: 0 0 6px; font-family: Outfit, sans-serif; letter-spacing: 0; }
.ad-slot:empty { display: none; }
.ad-slot { margin: 18px 0; }
.ad-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .logo img { height: 42px; }
  .header-tools { margin-left: 0; width: 100%; justify-content: flex-end; }
}
@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
  .prices { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .hero, .prose, .workspace, .doc-view { padding: 28px; }
  .doc-view { padding: 36px 42px; }
  .thumbs { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .desk-nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
  .header-cta { display: inline-flex; }
  .grid.tools { grid-template-columns: 1fr 1fr 1fr; }
  .hero { padding: 48px 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .tool-card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .workspace, .ad-slot, .hero-actions { display: none !important; }
  body { background: white; }
}
