/* =========================================================
   /sign — sign a PDF in the browser
   ========================================================= */
.sg-hero { background: radial-gradient(1200px 400px at 80% -10%, rgba(163, 230, 53, 0.18), transparent 60%), linear-gradient(180deg, var(--bg-tint), #fff); padding: 56px 0 30px; text-align: center; }
.sg-hero-inner { max-width: 760px; }
.sg-hero .eyebrow svg { width: 16px; height: 16px; }
.sg-hero h1 { font-size: clamp(2.6rem, 6vw, 4rem); letter-spacing: -0.035em; margin: 0 0 10px; color: var(--ink); }
.sg-lede { font-size: 1.2rem; color: var(--muted); margin: 0 auto 22px; max-width: 560px; }
.sg-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 0.92rem; color: var(--text); }
.sg-points li { display: inline-flex; align-items: center; gap: 7px; }
.sg-points svg { width: 17px; height: 17px; color: var(--lime-700); }

.sg-app { position: relative; padding-top: 10px; padding-bottom: 40px; }
.sg-drop { border: 2px dashed var(--line-2); border-radius: 18px; background: #fff; padding: 46px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; box-shadow: var(--shadow); }
.sg-drop:hover, .sg-drop:focus-visible, .sg-drop.is-over { border-color: var(--lime-600); background: var(--lime-50); outline: none; }
.sg-drop h2 { margin: 12px 0 4px; font-size: 1.35rem; }
.sg-drop p { margin: 6px 0; color: var(--muted); }
.sg-drop .btn { margin: 6px 0 4px; }
.sg-drop .btn svg { width: 18px; height: 18px; }
.sg-drop-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto; background: var(--lime-100); color: var(--lime-800); }
.sg-drop-icon svg { width: 34px; height: 34px; }
#sg-error { margin-top: 14px; }

.sg-bar { position: sticky; top: 80px; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.sg-file { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.sg-file strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 0.95rem; }
.sg-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sg-tool { display: inline-flex; align-items: center; }
.sg-tools .btn svg { width: 16px; height: 16px; }
.sg-tools .btn img { height: 20px; max-width: 70px; object-fit: contain; margin-left: 4px; background: #fff; border-radius: 4px; padding: 1px 3px; }
.sg-change { padding: 7px 7px; }
.sg-tool:not(:has(img:not([hidden]))) .sg-change { display: none; }
.sg-out { display: flex; gap: 6px; margin-left: auto; }
.sg-out .btn svg { width: 16px; height: 16px; }
.sg-banner { flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 10px; padding: 5px 8px 5px 16px; font-size: 0.9rem; }
.sg-banner .btn { color: #fff; }
.sg-banner .btn:hover { color: var(--ink); }
.sg-tip { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 14px 0 0; }
.sg-tip svg { width: 15px; height: 15px; flex: none; }

.sg-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 0 10px; }
.sg-page { position: relative; width: min(100%, 880px); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 12px 32px -14px rgba(15, 23, 42, 0.35); border-radius: 3px; user-select: none; -webkit-user-select: none; }
.sg-page canvas { display: block; width: 100%; height: 100%; border-radius: 3px; }
.sg-page:not(.is-ready) { background: #fff linear-gradient(90deg, #fff, var(--bg-soft), #fff) 0 0 / 200% 100%; animation: sg-shimmer 1.4s linear infinite; }
@keyframes sg-shimmer { to { background-position: -200% 0; } }
.sg-page-num { position: absolute; bottom: -20px; right: 0; font-size: 0.75rem; color: var(--muted-2); }
body.sg-placing .sg-page { cursor: crosshair; outline: 2px dashed var(--lime-500); outline-offset: 4px; }
body.sg-placing .sg-item { pointer-events: none; }

.sg-item { position: absolute; cursor: grab; touch-action: none; border-radius: 4px; outline: 1px dashed transparent; outline-offset: 2px; }
.sg-item img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sg-item:hover, .sg-item.is-selected { outline-color: var(--lime-600); background: rgba(163, 230, 53, 0.08); }
.sg-item.is-moving { cursor: grabbing; }
.sg-item:focus-visible { outline: 2px solid var(--lime-700); }
.sg-del, .sg-resize { position: absolute; display: none; }
.sg-item.is-selected .sg-del, .sg-item.is-selected .sg-resize, .sg-item:hover .sg-del, .sg-item:hover .sg-resize { display: grid; }
.sg-del { top: -12px; right: -12px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; place-items: center; cursor: pointer; padding: 0; box-shadow: var(--shadow-sm); }
.sg-del svg { width: 12px; height: 12px; }
.sg-del:hover { background: var(--danger); }
.sg-resize { right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 4px; background: #fff; border: 2px solid var(--lime-600); cursor: nwse-resize; }
@media (pointer: coarse) {
  .sg-del { width: 30px; height: 30px; top: -16px; right: -16px; }
  .sg-resize { width: 22px; height: 22px; right: -11px; bottom: -11px; }
}

.sg-ghost { position: fixed; z-index: 50; pointer-events: none; opacity: 0.65; }
.sg-busy { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(2px); font-weight: 600; color: var(--ink); }
.sg-spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--lime-100); border-top-color: var(--lime-600); animation: sg-spin .8s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }

.sg-how { padding-top: 34px; padding-bottom: 20px; }
.sg-how h2, .sg-faq h2 { font-size: 1.7rem; letter-spacing: -0.02em; text-align: center; margin: 0 0 22px; }
.sg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sg-steps li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.sg-steps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lime-100); color: var(--lime-800); font-weight: 700; }
.sg-steps h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.sg-steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.sg-fontshow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 40px; margin: 30px 0 0; color: var(--ink-2); line-height: 1.2; }

.sg-faq { padding-top: 30px; padding-bottom: 60px; max-width: 860px; }
.sg-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 30px; padding: 24px 26px; border-radius: 16px; background: var(--ink); color: #fff; }
.sg-cta h3 { margin: 0 0 4px; color: #fff; }
.sg-cta p { margin: 0; color: rgba(255, 255, 255, 0.72); max-width: 520px; }
.sg-cta .btn-dark { --b-bg: var(--lime-500); --b-fg: var(--ink); --b-bd: var(--lime-500); }

@media (max-width: 860px) {
  .sg-steps { grid-template-columns: 1fr; }
  /* small screens: the toolbar scrolls with the page; the placing hint floats at the bottom */
  .sg-bar { position: static; backdrop-filter: none; } /* a backdrop filter would trap the fixed hint inside the bar */
  .sg-banner { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 30; box-shadow: var(--shadow-lg); }
  .sg-out { margin-left: 0; width: 100%; }
  .sg-out .btn-primary { flex: 1; justify-content: center; }
}

/* date and time of signing, LimePortrait seal */
.sg-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 12px 4px 0; font-size: 0.92rem; }
.sg-opt { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.sg-opt input { width: 17px; height: 17px; margin: 0; accent-color: var(--lime-600); }
.sg-opt svg { width: 16px; height: 16px; color: var(--muted); }
.sg-opt img { border-radius: 5px; }
.sg-opt-help { font-size: 0.85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.sg-sealed { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 4px 11px; border-radius: 999px; background: var(--lime-50); border: 1px solid var(--lime-200, #d9f99d); color: var(--lime-800); font-size: 0.85rem; font-weight: 600; }
.sg-sealed svg { width: 15px; height: 15px; }
.sg-sealed a { color: inherit; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* /verify */
.vf-form { display: flex; gap: 8px; max-width: 460px; margin: 4px auto 0; }
.vf-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.06em; text-align: center; text-transform: uppercase; background: #fff; }
.vf-form input::placeholder { color: var(--muted-2); font-weight: 500; }
.vf-form input:focus { outline: none; border-color: var(--lime-500); box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.18); }
.vf-bad { margin: 14px auto 0; max-width: 520px; color: var(--danger); font-weight: 500; }
.vf-main { max-width: 820px; padding-top: 10px; padding-bottom: 60px; display: flex; flex-direction: column; gap: 18px; }
.vf-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--lime-500); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.vf-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.vf-head h2 { margin: 0 0 2px; font-size: 1.3rem; }
.vf-head p { margin: 0; color: var(--muted); }
.vf-badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime-500); color: var(--ink); }
.vf-badge svg { width: 24px; height: 24px; stroke-width: 2.6; }
.vf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; margin: 0; }
.vf-facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 3px; }
.vf-facts dd { margin: 0; font-weight: 600; color: var(--ink); }
.vf-wide { grid-column: 1 / -1; }
.vf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.vf-hash { font-size: 0.8rem; font-weight: 500; word-break: break-all; color: var(--ink-2); }
.vf-local { display: block; font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.vf-drop { padding: 34px 20px; }
.vf-drop.is-busy { opacity: 0.6; pointer-events: none; }
.vf-check { display: flex; gap: 14px; align-items: flex-start; border-radius: 14px; padding: 16px 18px; border: 1px solid; }
.vf-check.is-ok { background: var(--lime-50); border-color: #bef264; color: var(--lime-800); }
.vf-check.is-bad { background: var(--danger-bg); border-color: #fecaca; color: #991b1b; }
.vf-check strong { display: block; font-size: 1.05rem; color: inherit; }
.vf-check p { margin: 3px 0 0; color: var(--ink-2); }
.vf-check-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--lime-600); }
.vf-check.is-bad .vf-check-icon { background: var(--danger); }
.vf-check-icon svg { width: 18px; height: 18px; }
.vf-about { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.vf-about h2 { margin: 0 0 12px; font-size: 1.25rem; }
.vf-about ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vf-about li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.vf-about li > svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--lime-700); }
.vf-about strong { color: var(--ink); }
.vf-about .btn svg { width: 17px; height: 17px; }
@media (max-width: 560px) {
  .vf-form { flex-direction: column; }
  .sg-sealed { margin-left: 0; }
}
