:root {
  --ink: #0d0f12;
  --muted: #5c6370;
  --line: #e6e8ec;
  --soft: #f6f7f8;
  --bg: #ffffff;
  --cream: #fff7ea;
  --pass: #1e8e5a;
  --pass-bg: #e8f6ee;
  --warn: #a96410;
  --warn-bg: #fdf3e2;
  --fail: #c2362f;
  --fail-bg: #fdecea;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(13, 15, 18, .04), 0 8px 24px rgba(13, 15, 18, .06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 40em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 1.5px solid transparent; border-radius: 999px; padding: .8em 1.5em; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, opacity .15s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2e35; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--soft); }
.btn-ghost { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; padding-left: .5em; padding-right: .5em; }
.btn-sm { padding: .6em 1.2em; font-size: .9375rem; }
.btn-lg { padding: 1em 1.75em; font-size: 1.0625rem; }
:focus-visible { outline: 3px solid #7aa7ff; outline-offset: 2px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .55em; font-weight: 750; font-size: 1.125rem; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .9375rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(:first-child) { display: none; } }

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 48px 0 24px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-title { font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4em; font-size: .9375rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .section { padding: 56px 0; } }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5em; color: var(--muted); }
.ticks li::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: .6em; vertical-align: -3px; background: url("../img/check.svg") center / contain no-repeat; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

.picker { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; }
.picker-list { list-style: none; margin: 0; padding: 4px; display: grid; align-content: center; gap: 2px; }
.picker-list a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; text-decoration: none; font-weight: 550; }
.picker-list a:hover { background: var(--soft); }
.featured { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--cream); border-radius: var(--radius); padding: 22px; text-decoration: none; }
.featured-top { display: flex; justify-content: space-between; align-items: flex-start; align-self: stretch; }
.featured .badge { background: var(--pass); color: #fff; font-weight: 700; font-size: .8125rem; padding: .25em .7em; border-radius: 6px; }
.featured-icon { width: 72px; height: auto; }
.featured-name { font-size: 1.5rem; font-weight: 750; line-height: 1.2; letter-spacing: -0.02em; }
.featured-size { font-weight: 600; }
.featured .btn { margin-top: 14px; }
@media (max-width: 520px) { .picker { grid-template-columns: 1fr; } }

/* Document grid */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 24px; }
.doc-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.doc-card:hover { border-color: #c9ccd3; box-shadow: var(--shadow); }
.doc-card-body { display: grid; flex: 1; }
.doc-card-name { font-weight: 650; }
.arrow { color: var(--muted); font-size: 1.25rem; }

.steps-grid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 14px; }
@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; gap: 24px; } }

.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: 12px 0 0; }

.cta-band { text-align: center; }
.cta-inner { display: grid; justify-items: center; gap: 12px; }

/* Document page */
.doc-hero { padding: 32px 0 24px; }
.crumbs { color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.doc-title { display: flex; gap: 20px; align-items: center; }
.doc-title h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: .2em; }
.doc-title .lead { margin: 0; }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; font-size: .9375rem; font-weight: 600; }
.chips .muted { font-weight: 500; margin-right: .3em; }

.req-list, .tip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.req-list li, .tip-list li { position: relative; padding-left: 30px; }
.req-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; background: url("../img/check.svg") center / contain no-repeat; }
.tip-list li::before { content: ""; position: absolute; left: 6px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

/* Tool */
.tool { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; background: #fff; }
.tool-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 16px; }
@media (max-width: 860px) { .tool-split { grid-template-columns: 1fr; gap: 28px; padding: 4px; } .tool { padding: 16px; } }
.tool-heading { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 750; }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 20px; border: 2px dashed #cfd3da; border-radius: var(--radius); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.dropzone:has(.file-input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--soft); }
.dropzone-title { font-size: 1.375rem; font-weight: 700; }
.dropzone-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 10px 0 4px; }
.dropzone .dropzone-actions .btn { margin: 0; }
.camera-open { display: none; }
@media (hover: hover) and (pointer: fine) { .camera-open { display: inline-flex; } }

/* Webcam dialog (desktop) */
.camera { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: var(--radius-lg); padding: 20px; box-shadow: 0 24px 64px rgba(13, 15, 18, .3); color: var(--ink); }
.camera::backdrop { background: rgba(13, 15, 18, .55); }
.camera-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.camera-head h2 { font-size: 1.25rem; margin: 0; }
.camera-close { border: 0; background: none; font-size: 1.75rem; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--muted); }
.camera-close:hover { color: var(--ink); }
.camera-stage { position: relative; aspect-ratio: 4 / 3; max-height: calc(100vh - 230px); margin: 0 auto; background: #111; border-radius: var(--radius); overflow: hidden; }
.camera-stage video, .camera-stage img { width: 100%; height: 100%; object-fit: cover; }
.camera-stage video { transform: scaleX(-1); }
.camera-oval { position: absolute; left: 50%; top: 46%; height: 52%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 3px dashed rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28); pointer-events: none; }
.camera-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; font-weight: 750; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }
.camera-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; margin: 0; text-align: center; color: #fff; font-weight: 500; }
.camera-tip { text-align: center; margin: 12px 0; }
.camera-actions { display: flex; justify-content: center; gap: 12px; }
.form-error { color: var(--fail); background: var(--fail-bg); border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; font-weight: 500; }

.progress { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 0; }
.progress li { position: relative; display: flex; align-items: center; gap: 18px; padding: 14px 0; font-size: 1.25rem; font-weight: 600; color: #b9bdc5; transition: color .2s ease; }
.progress li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 50px; height: calc(100% - 36px); width: 2px; background: var(--line); }
.progress .dot { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #d5d8de; display: grid; place-items: center; background: #fff; }
.progress li.is-active { color: var(--ink); }
.progress li.is-active .dot { border-color: var(--ink); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress li.is-done { color: var(--ink); }
.progress li.is-done .dot { background: var(--ink); border-color: var(--ink); }
.progress li.is-done .dot::after { content: ""; width: 14px; height: 14px; background: url("../img/check-white.svg") center / contain no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

.scan-frame { position: relative; border-radius: 28px; overflow: hidden; background: var(--soft); aspect-ratio: 3 / 4; max-width: 420px; width: 100%; justify-self: center; box-shadow: var(--shadow); }
.scan-frame img { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(to bottom, rgba(30, 142, 90, .55), rgba(30, 142, 90, 0)); animation: scan 2.4s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-60%); } to { transform: translateY(170%); } }
@media (prefers-reduced-motion: reduce) { .scan-line, .progress li.is-active .dot { animation: none; } }

.checks { list-style: none; padding: 0; margin: 24px 0; }
.checks li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-label { font-weight: 650; font-size: 1.0625rem; }
.check-msg { grid-column: 1 / -1; color: var(--muted); font-size: .9375rem; }
.pill { display: inline-flex; align-items: center; gap: .4em; border-radius: 999px; padding: .3em .85em; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.pill-pass { color: var(--pass); background: var(--pass-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-fail { color: var(--fail); background: var(--fail-bg); }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 14px; }
.result-actions .btn { flex: 1 1 auto; white-space: nowrap; }
@media (max-width: 860px) { .tool-split .measure { order: -1; } }

.measure { margin: 0; justify-self: center; width: 100%; max-width: 460px; padding: 44px 68px 16px 68px; }
.measure-photo { position: relative; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.measure-photo img { width: 100%; height: auto; border-radius: 4px; }
.measure-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.measure-overlay .guide { stroke: var(--pass); stroke-width: 1.2; stroke-dasharray: 5 4; }
.measure-overlay .dim-line { stroke: var(--ink); stroke-width: 1.2; }
.measure-overlay .head-line { stroke: var(--pass); stroke-width: 1.6; }
/* Label positions use the same % coordinates as the SVG lines (x: % of width, y: % of height). */
.dim { position: absolute; transform: translate(-50%, -50%); font-size: .8125rem; font-weight: 700; color: #fff; background: var(--ink); border-radius: 4px; padding: .1em .45em; white-space: nowrap; }
.dim-top { top: -9%; left: 50%; }
.dim-left { left: -11%; top: 50%; }
.dim-head { left: 110%; background: var(--pass); }
@media (max-width: 480px) { .measure { padding: 40px 52px 12px 52px; } }

.tool-error { text-align: center; padding: 40px 16px; }

/* Success */
.success-grid { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; margin: 32px 0 48px; }
.success-photo { width: 220px; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.downloads { display: grid; gap: 12px; }
.download { display: grid; gap: 2px; padding: 18px 20px 18px 60px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: url("../img/download.svg") 20px center / 24px no-repeat; }
.download:hover { border-color: var(--ink); }
.download-name { font-weight: 700; font-size: 1.0625rem; }
@media (max-width: 600px) { .success-grid { grid-template-columns: 1fr; } }

/* Legal */
.prose h2 { font-size: 1.25rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; display: grid; gap: .5em; }

/* Discount */
.offer-bar { background: var(--ink); color: #fff; font-size: .9375rem; }
.offer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.offer-bar s { opacity: .65; }
.price { white-space: nowrap; }
.price-old { color: var(--muted); font-weight: 500; margin-right: .2em; }
.price-now { font-weight: 750; }
.hero-price { font-size: 1.25rem; margin: 0 0 .25em; }
.hero-price .muted { font-size: 1rem; }
.free-note { color: var(--pass); font-weight: 600; }
.result-offer { margin: 0 0 10px; }
.result-offer s { color: var(--muted); margin-right: .3em; }

/* Trust */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-list li { display: flex; gap: 12px; align-items: flex-start; }
.trust-list li > span { display: grid; line-height: 1.35; }
@media (max-width: 860px) { .trust-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .trust-list { grid-template-columns: 1fr; gap: 14px; } }

.section-tight { padding: 40px 0 0; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 28px 0 40px; }
@media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; gap: 20px; } }
.assure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .assure-row { grid-template-columns: 1fr; } }
.assure { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.assure img { flex: none; }
.assure h3 { margin-bottom: .3em; }
.assure p { margin: 0; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.review { margin: 0; background: var(--bg); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review blockquote { margin: 0 0 12px; }

/* Checkout */
.checkout { padding: 32px 0 72px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "option side" "pay side"; gap: 28px 56px; align-items: start; }
.checkout-option { grid-area: option; }
.checkout-pay { grid-area: pay; }
.checkout-side { grid-area: side; display: grid; gap: 16px; position: sticky; top: 84px; }
.checkout-assure { display: grid; gap: 12px; }
@media (max-width: 860px) {
  /* Phones: summary, payment (wallet buttons first), what's included, guarantees. */
  .checkout-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "summary" "pay" "option" "assure"; gap: 24px; }
  .checkout-side { display: contents; }
  .checkout-summary { grid-area: summary; }
  .checkout-assure { grid-area: assure; }
  .checkout-option .checkout-title { font-size: 1.25rem; }
}
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.checkout-title { font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 20px; }
.option { border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; }
.option-head { display: flex; align-items: center; gap: 14px; }
.radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); box-shadow: inset 0 0 0 4px var(--bg); background: var(--ink); }
.option-name { font-size: 1.25rem; font-weight: 700; flex: 1; }
.option-price { font-size: 1.25rem; }
.option-features { list-style: none; margin: 18px 0 16px; padding: 0 0 0 36px; display: grid; gap: 12px; }
.option-features li { display: flex; gap: 12px; align-items: center; }
.option-features img { flex: none; }
.option-note { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin: 0; }
@media (max-width: 480px) { .option-features { padding-left: 0; } .option { padding: 18px; } }
.btn-block { width: 100%; }
.pay-title { font-size: 1.25rem; margin-bottom: 12px; }
.pay-box { position: relative; min-height: 120px; }
.pay-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
#stripe-checkout:empty { display: none; }
.pay-error { border: 1px solid var(--fail-bg); background: var(--fail-bg); border-radius: var(--radius); padding: 16px; }
.pay-error p { color: var(--fail); font-weight: 500; margin: 0 0 12px; }
.pay-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; }
.checkout-steps p { margin: 0 0 8px; }
.steps-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 18px; }
.steps-bar span { height: 5px; border-radius: 3px; background: var(--line); }
.steps-bar span:nth-child(-n+2) { background: var(--pass); }
.order-card { background: var(--soft); border-radius: var(--radius); padding: 22px; }
.order-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.order-doc { font-size: 1.25rem; margin-bottom: .2em; }
.order-head p { margin: 0; }
.order-thumb { width: 96px; height: auto; border-radius: 8px; box-shadow: var(--shadow); background: #fff; }
.order-lines { margin: 0; }
.order-lines > div { display: flex; justify-content: space-between; padding: 12px 0; }
.order-lines dt, .order-lines dd { margin: 0; }
.order-discount { color: var(--pass); font-weight: 600; }
.order-total { border-top: 1px solid var(--line); font-size: 1.25rem; font-weight: 750; }
.order-total dd { color: var(--pass); }
