/* ============================================================
   VisaPhoto Studio — public design system
   Modern · minimal · professional. Emerald accent, slate neutrals.
   ============================================================ */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --border: #e5e9f0;
    --border-strong: #d3dae4;
    --text: #101828;
    --muted: #5c6b80;
    --accent: #0e9f6e;
    --accent-dark: #067a54;
    --accent-soft: #e7f8f1;
    --accent-ring: rgba(14, 159, 110, 0.22);
    --danger: #d92d20;
    --danger-soft: #fef1f0;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --info-soft: #f2f6fa;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 6px 18px -6px rgba(16, 24, 40, 0.12);
    --shadow-lg: 0 18px 44px -14px rgba(16, 24, 40, 0.24);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .875rem; }
.code-font { font-family: var(--mono); font-size: .85rem; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
    padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- layout: sticky footer ---------- */
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site > main { flex: 1 0 auto; }
.footer { margin-top: auto; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; font-size: .95rem;
    padding: 11px 20px; min-height: 44px;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(16, 24, 40, 0.05); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fdd8d5; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; border-radius: 12px; }
.btn-sm { padding: 7px 13px; min-height: 36px; font-size: .85rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); cursor: pointer; text-decoration: underline; }

/* ---------- badges & alerts ---------- */
.badge {
    display: inline-flex; align-items: center;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(16, 24, 40, 0.06); color: var(--muted);
}
.badge-success { background: var(--accent-soft); color: var(--accent-dark); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { opacity: .75; }

.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 16px; border: 1px solid; font-size: .95rem; }
.alert p { margin: .35em 0 0; }
.alert-success { background: var(--accent-soft); border-color: #bfe9d9; color: #065f46; }
.alert-danger { background: var(--danger-soft); border-color: #f6c9c5; color: #91261d; }
.alert-info { background: var(--info-soft); border-color: var(--border); color: var(--text); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; }
.input {
    width: 100%; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 11px 14px; min-height: 44px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.textarea { resize: vertical; min-height: 90px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c6b80' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.check { display: flex; align-items: center; gap: 9px; margin: 6px 0; font-size: .95rem; min-height: 30px; cursor: pointer; }
.check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.color-input { padding: 4px; height: 44px; cursor: pointer; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; }

/* ---------- cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 1.15rem; margin-bottom: 14px; }

/* ---------- navbar ---------- */
.navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; letter-spacing: -0.01em; text-decoration: none !important; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent-dark);
}
.brand-name { font-size: 1.02rem; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav-links a {
    color: var(--muted); font-weight: 600; font-size: .93rem;
    padding: 9px 12px; border-radius: 8px; text-decoration: none !important;
}
.nav-links a:hover { color: var(--text); background: rgba(16, 24, 40, 0.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; min-width: 44px; min-height: 44px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 2px; transition: .2s; }
/* Mobile menu is a floating dropdown: it opens OVER the page content
   (absolute, anchored to the sticky navbar) instead of pushing the page
   down. Explicit [hidden] rule keeps the hidden attribute authoritative. */
.mobile-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 60;
    display: flex; flex-direction: column;
    padding: 12px 20px 20px; gap: 4px;
    background: var(--surface, #fff);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -20px rgba(16, 24, 40, 0.28);
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: mobile-menu-in .16s ease;
}
.mobile-menu[hidden] { display: none; }
@keyframes mobile-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-menu a { color: var(--text); font-weight: 600; padding: 12px 8px; text-decoration: none !important; border-radius: 8px; }
.mobile-menu a:hover { background: rgba(16, 24, 40, 0.05); }
.mobile-menu .btn { margin-top: 8px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--accent-dark); background: var(--accent-soft);
    padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent-dark); }
.hero-sub { font-size: 1.13rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; color: var(--muted); font-size: .9rem; }
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.hero-visual img { border-radius: 20px; box-shadow: var(--shadow-lg); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { margin-bottom: 8px; }
.section-sub { color: var(--muted); max-width: 44em; margin-bottom: 32px; }
.section-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head { padding-bottom: 8px; }

/* ---------- steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { position: relative; padding-top: 34px; }
.step-number {
    position: absolute; top: -14px; left: 24px;
    width: 40px; height: 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem;
    box-shadow: var(--shadow-md);
}
.step-card p { color: var(--muted); margin: 0; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; max-height: 640px; overflow-y: auto; }
.table-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
    text-align: left; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
    padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.bg-dot { display: inline-block; width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--border-strong); vertical-align: -2px; margin-right: 2px; }
.specs-table-wrap { padding: 6px 10px; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 7px 0 7px 30px; position: relative; }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: 13px;
    width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
}
.check-list li::after {
    content: ""; position: absolute; left: 5px; top: 18px;
    width: 7px; height: 4px; border-left: 2px solid var(--accent-dark); border-bottom: 2px solid var(--accent-dark);
    transform: rotate(-45deg);
}
.pricing-card { text-align: center; display: flex; flex-direction: column; gap: 8px; padding: 32px 24px; box-shadow: var(--shadow-md); }
.pricing-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.pricing-card .btn { margin-top: 12px; }

/* ---------- blog ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: var(--text); text-decoration: none !important; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.post-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-body h2, .post-card-body h3 { margin: 0; font-size: 1.08rem; }
.post-card-body p { color: var(--muted); margin: 0; font-size: .92rem; flex: 1; }
.post-card-body .muted { font-size: .8rem; }

.single-post h1 { margin-top: 10px; }
.single-post-img { border-radius: var(--radius); margin: 18px 0 26px; }
.back-link { display: inline-block; margin-bottom: 6px; font-weight: 600; }

.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 1.5em; }
.prose h3 { margin-top: 1.3em; }
.prose img { border-radius: var(--radius-sm); margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: .2em 1.2em; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose table td, .prose table th { border: 1px solid var(--border); padding: 8px 10px; }

.cta-card { text-align: center; padding: 44px 28px; background: linear-gradient(135deg, var(--accent-soft), #ffffff 60%); }
.cta-card p { color: var(--muted); margin-bottom: 22px; }
.cta-card.compact { margin-top: 40px; padding: 30px 24px; }

/* ---------- studio widget ---------- */
.studio-card { padding: 28px; }
.studio-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.studio-step-dot {
    font-size: .78rem; font-weight: 700; color: var(--muted);
    padding: 7px 13px; border-radius: 999px; background: rgba(16, 24, 40, 0.05);
}
.studio-step-dot.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.studio-pane { display: none; }
.studio-pane.is-active { display: block; }
.studio-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.spec-hint { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.spec-chip {
    font-size: .8rem; font-weight: 600; padding: 6px 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; color: var(--muted);
}
.spec-chip b, .spec-chip strong { color: var(--text); }

.retake-resolve-row { display: flex; gap: 10px; }
.retake-resolve-row .input { flex: 1; font-family: var(--mono); text-transform: uppercase; }

.dropzone {
    border: 2px dashed var(--border-strong); border-radius: var(--radius);
    padding: 44px 24px; text-align: center; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    background: #fbfcfd;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-drag {
    border-color: var(--accent); background: var(--accent-soft); outline: none;
}
.dropzone svg { margin: 0 auto 10px; color: var(--accent-dark); }
.dropzone-title { font-weight: 600; margin-bottom: 4px; }
.upload-preview { display: flex; gap: 22px; align-items: flex-start; margin-top: 20px; flex-wrap: wrap; }
.upload-preview img { width: 220px; max-width: 40%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.upload-meta { flex: 1; min-width: 220px; }

.proc-list { list-style: none; padding: 0; margin: 0 0 22px; max-width: 480px; }
.proc-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: var(--muted); font-weight: 600; }
.proc-list li.is-active { color: var(--text); }
.proc-list li.is-done { color: var(--accent-dark); }
.proc-icon {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    border: 2px solid var(--border-strong); position: relative; background: var(--surface);
}
.proc-list li.is-active .proc-icon { border-color: var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.proc-list li.is-done .proc-icon { border-color: var(--accent); background: var(--accent); }
.proc-list li.is-done .proc-icon::after {
    content: ""; position: absolute; left: 5px; top: 6px; width: 7px; height: 4px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 6px 0 14px; }

.result-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; margin-bottom: 22px; }
.result-doc-title { margin: 0 0 14px; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.result-doc-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.result-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.result-card figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
/* Preview frame around the finished photo / print sheet: clean white base —
   JS tints it with the DOCUMENT's own bg color at reduced opacity
   ([data-spec-backdrop]) so the frame never contrasts with the photo bg. */
.result-img-wrap { display: flex; align-items: center; justify-content: center; min-height: 220px; background: #ffffff; border-radius: var(--radius-sm); padding: 10px; }
.result-img-wrap img { max-height: 300px; box-shadow: var(--shadow-md); border-radius: 4px; }
.result-img-wrap.sheet img { max-height: 260px; background: #fff; }
.result-dim { display: block; text-align: center; font-size: .8rem; color: var(--muted); margin-top: 8px; font-family: var(--mono); }
.alignment-note { display: block; text-align: center; font-size: .78rem; color: var(--success, #0a7d4f); margin-top: 6px; }
.sheet-picker { margin-top: 14px; }
.sheet-picker .label { margin-bottom: 4px; }

.downloads { border-top: 1px solid var(--border); padding-top: 20px; }
.downloads-title { margin-bottom: 12px; }
.downloads-grid { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.downloads .btn-lg { width: 100%; }
.checkout { border-top: 1px solid var(--border); padding-top: 20px; }
.checkout-panel { min-height: 120px; }
.paid-actions { border-top: 1px solid var(--border); padding-top: 20px; }
.paid-actions .downloads-grid { flex-direction: row; flex-wrap: wrap; }

.retake-box { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.retake-box h3 { margin-bottom: 6px; }
.retake-code-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.retake-code {
    font-family: var(--mono); font-size: 1.25rem; font-weight: 700; letter-spacing: .06em;
    background: var(--warning-soft); border: 1px dashed #ecc06a; color: var(--warning);
    padding: 12px 18px; border-radius: var(--radius-sm);
}
.studio-session-note { margin-top: 14px; }

/* ---------- studio modal (fullscreen) ---------- */
.studio-modal { position: fixed; inset: 0; z-index: 90; display: flex; }
.studio-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.55); backdrop-filter: blur(3px); }
.studio-modal-panel {
    position: relative; z-index: 1; width: 100%; height: 100%;
    background: var(--bg); overflow-y: auto; padding: 30px 20px 50px;
    animation: modal-in .18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.studio-modal-panel .studio { max-width: 860px; margin-inline: auto; }
.studio-modal-close {
    position: fixed; top: 14px; right: 18px; z-index: 5;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-md);
}
.studio-modal-close:hover { border-color: var(--border-strong); }

/* ---------- contact / misc ---------- */
.contact-card { max-width: 640px; margin-inline: auto; }
.empty-state { text-align: center; color: var(--muted); }

/* ---------- footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 36px; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 30em; margin-top: 12px; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.footer-grid > div > a { display: block; color: var(--text); padding: 5px 0; font-size: .93rem; text-decoration: none !important; }
.footer-grid > div > a:hover { color: var(--accent-dark); }
.footer-bottom {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 18px 0 22px; border-top: 1px solid var(--border);
    color: var(--muted); font-size: .85rem;
}

/* ---------- error page ---------- */
.error-page { display: flex; align-items: center; min-height: 70vh; padding: 60px 0; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--border-strong); margin: 0; line-height: 1; }
.error-detail { background: var(--danger-soft); color: var(--danger); padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding-top: 44px; }
    .hero-visual { max-width: 560px; }
    .steps-grid, .posts-grid { grid-template-columns: 1fr 1fr; }
    .pricing-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-actions .btn { display: none; }
    .steps-grid, .posts-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
    .studio-card { padding: 20px 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .upload-preview img { max-width: 60%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- image protection (photo application) --------------------------------- */
/* Generated photos must not be draggable/selectable inside the studio or the
   fullscreen modal (right-click and Ctrl+U are blocked in site.js). */
.studio img,
.studio-modal img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ---- checkout page --------------------------------------------------------- */
/* Final photos (left) + order/checkout card (right). Whop mounts its card
   checkout element into the side panel; downloads + retake code unlock there. */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
    align-items: start;
}
.checkout-side { position: sticky; top: 24px; }
.checkout-side-title { margin: 0 0 12px; font-size: 1.1rem; }
.checkout-summary {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: .95rem;
}
.checkout-summary li { display: flex; gap: 10px; align-items: flex-start; }
.checkout-summary li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--accent);
}
.checkout-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-bottom: 16px;
    font-weight: 800;
    font-size: 1.15rem;
}
.checkout-waiting {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    margin: 8px 0 14px;
}
.checkout-waiting .spinner { margin: 0; flex: none; }
.checkout-assurance { margin-top: 14px; text-align: center; }
.checkout-head { margin-bottom: 26px; }
.checkout img,
[data-protect] img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}
@media (max-width: 980px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-side { position: static; }
}

/* ============================================================
   CMS blocks + widget enhancements (accordion, combobox, scan)
   ============================================================ */

/* ---------- mobile header: keep Create photo visible ---------- */
@media (max-width: 720px) {
    .nav-actions .btn.btn-primary { display: inline-flex; }
    .nav-links { display: none; }
}

/* ---------- country combobox (flags + search) ---------- */
.vp-combo { position: relative; }
.vp-combo-btn {
    display: flex; align-items: center; gap: 10px; width: 100%;
    text-align: left; cursor: pointer; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    padding: 10px 12px; min-height: 44px;
}
.vp-combo-btn:hover { border-color: var(--accent); }
.vp-combo-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-combo-caret { color: var(--muted); flex: none; }
.vp-flag { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16,24,40,.12); flex: none; }
.vp-combo-panel {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in .14s ease;
}
.vp-combo-searchwrap { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--muted); }
.vp-combo-searchwrap .input { border: none; box-shadow: none; padding: 4px 0; background: transparent; }
.vp-combo-searchwrap .input:focus { outline: none; box-shadow: none; }
.vp-combo-list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow-y: auto; }
.vp-combo-list li {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px;
    cursor: pointer; font-size: .95rem;
}
.vp-combo-list li:hover, .vp-combo-list li[data-highlight] { background: var(--accent-soft); }
.vp-combo-name { flex: 1; }
.vp-combo-count { font-size: .78rem; color: var(--muted); background: rgba(16,24,40,.05); border-radius: 999px; padding: 2px 9px; }
.vp-combo-empty { cursor: default; color: var(--muted); }

/* ---------- document type → variant chips ---------- */
.doc-variants { margin-top: 14px; }
.doc-variants .label { margin-bottom: 8px; }
.doc-variant-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-variant-chip {
    display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
    font: inherit; cursor: pointer; text-align: left;
    background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
    padding: 9px 14px; transition: border-color .14s ease, background .14s ease;
}
.doc-variant-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.doc-variant-chip.is-selected { border-color: var(--accent-dark); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.doc-variant-chip strong { font-size: .92rem; }
.doc-variant-chip span { font-size: .78rem; color: var(--muted); }

/* ---------- processing: photo scan animation ---------- */
.scan-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 12px 0 4px; }
.scan-photo-wrap {
    position: relative; overflow: hidden; border-radius: var(--radius);
    border: 1px solid var(--border); background: #fbfcfd; box-shadow: var(--shadow-md);
    max-width: 320px; width: 60%;
}
.scan-photo-wrap img { width: 100%; height: auto; display: block; }
.scan-line {
    position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--accent) 22%, #7ff3cd 50%, var(--accent) 78%, transparent);
    box-shadow: 0 0 18px 4px rgba(14, 159, 110, .45);
    animation: vp-scan 2.1s ease-in-out infinite alternate;
    pointer-events: none;
}
.scan-line::after {
    content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 72px;
    background: linear-gradient(180deg, rgba(14,159,110,.16), transparent);
}
@keyframes vp-scan { from { top: 0; } to { top: calc(100% - 3px); } }
.scan-progress { display: flex; align-items: center; gap: 12px; width: min(420px, 86%); }
.scan-progress-track {
    flex: 1; height: 12px; border-radius: 999px; background: rgba(16,24,40,.07); overflow: hidden;
}
.scan-progress-fill {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--accent), #34d399);
    border-radius: 999px; transition: width .25s ease;
}
.scan-percent { font-size: .85rem; color: var(--muted); min-width: 42px; text-align: right; }
.scan-caption { margin: 0; }

/* ---------- photo accordion (CMS block) ---------- */
.vp-acc {
    border: 2px solid var(--vp-acc-border, var(--accent));
    border-radius: var(--radius); padding: 4px 18px 18px; margin: 22px 0;
    background: var(--surface);
}
.vp-acc-heading { font-weight: 700; font-size: 1.02rem; margin: 12px 0 4px; }
.vp-acc-item { border-top: 1px solid var(--border); }
.vp-acc-item:first-of-type { border-top: none; }
.vp-acc-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-weight: 700; cursor: pointer; list-style: none; padding: 13px 2px;
}
.vp-acc-summary::-webkit-details-marker { display: none; }
.vp-acc-chevron {
    width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .18s ease; flex: none; margin-right: 4px;
}
.vp-acc-item[open] .vp-acc-chevron { transform: rotate(225deg); }
.vp-acc-body { padding: 4px 2px 14px; }
.vp-acc-grid { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 18px; align-items: start; }
.vp-acc-figure { margin: 0; position: relative; }
.vp-acc-figure img { width: 100%; border-radius: var(--radius-sm); display: block; }
.vp-acc-figure.is-ok img { outline: 3px solid #12b76a; outline-offset: 2px; }
.vp-acc-figure.is-bad img { outline: 3px solid var(--danger); outline-offset: 2px; }
.vp-acc-tag {
    position: absolute; left: 10px; top: 10px; font-size: .74rem; font-weight: 800;
    padding: 4px 10px; border-radius: 999px; color: #fff; letter-spacing: .02em;
}
.vp-acc-tag.is-ok { background: #12b76a; }
.vp-acc-tag.is-bad { background: var(--danger); }
.vp-acc-text { color: var(--text); font-size: .98rem; }
.vp-acc-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.vp-acc-thumb {
    position: relative; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
    background: none; cursor: pointer; width: 86px; height: 86px; overflow: hidden;
}
.vp-acc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vp-acc-thumb.is-ok { border-color: #12b76a; }
.vp-acc-thumb.is-bad { border-color: var(--danger); }
.vp-acc-thumb.is-active { box-shadow: 0 0 0 3px var(--accent-ring); }
@media (max-width: 640px) {
    .vp-acc-grid { grid-template-columns: 1fr; }
    .vp-acc { padding: 4px 12px 14px; }
}

/* ---------- create-photo form block (CMS) ---------- */
.vp-create-cta { margin: 26px 0; }
.vp-cta {
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
    padding: 24px; box-shadow: var(--shadow-sm);
}
.vp-cta-heading { font-weight: 800; font-size: 1.15rem; margin: 0 0 16px; }
.vp-cta-examples {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 18px;
}
.vp-cta-example { margin: 0; text-align: center; }
.vp-cta-example img {
    width: 100%; max-width: 230px; aspect-ratio: 3.5 / 4.5; object-fit: cover;
    border-radius: var(--radius-sm); margin-inline: auto; box-shadow: var(--shadow-md);
}
.vp-cta-example figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; font-weight: 600; }
.vp-cta-example.is-result img { outline: 3px solid #12b76a; outline-offset: 3px; }
.vp-cta-arrow { color: var(--accent-dark); }
.vp-cta-upload-row { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.vp-cta-dropzone {
    border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
    padding: 22px 18px; text-align: center; cursor: pointer; background: #fbfcfd;
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    transition: border-color .15s ease, background .15s ease;
}
.vp-cta-dropzone:hover, .vp-cta-dropzone:focus-visible, .vp-cta-dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.vp-cta-dropzone svg { color: var(--accent-dark); }
.vp-cta-file { margin: 0; font-size: .85rem; color: var(--muted); font-family: var(--mono); }
@media (max-width: 640px) {
    .vp-cta-examples { grid-template-columns: 1fr; }
    .vp-cta-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---------- hero with background image + floating compliance card ---------- */
.hero { position: relative; overflow: hidden; }
.hero-with-bg {
    background:
        linear-gradient(90deg, rgba(247, 248, 250, 0.96) 0%, rgba(247, 248, 250, 0.82) 44%, rgba(247, 248, 250, 0.35) 100%),
        var(--hero-bg, none) center / cover no-repeat;
    padding: 88px 0 56px;
}
.hero-floating {
    position: relative; max-width: 460px; margin-inline: auto;
    animation: vp-float 5.5s ease-in-out infinite;
}
@keyframes vp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-floating img {
    width: 100%; border-radius: 20px; box-shadow: var(--shadow-lg);
    border: 5px solid #fff;
}
.hero-floating .hero-check {
    position: absolute; right: 18px; bottom: 18px; width: 74px; height: 74px; border-radius: 50%;
    background: #12b76a; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px -8px rgba(18, 183, 106, .65), 0 0 0 6px rgba(255,255,255,.85);
    color: #fff;
}
.hero-floating .hero-check svg { width: 38px; height: 38px; }
@media (prefers-reduced-motion: reduce) { .hero-floating { animation: none; } }
@media (max-width: 980px) { .hero-with-bg { padding: 52px 0 40px; } }

/* ---------- specifications page ---------- */
.specs-full { padding: 10px; }
.specs-table th { white-space: nowrap; }
.specs-table td { white-space: nowrap; }
.spec-country { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
