:root {
    --bg: #f4f6fb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-disabled: #93c5fd;
    --border: #e5e7eb;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --warn-bg: #fef3c7;
    --warn-text: #92400e;
    --info-bg: #dbeafe;
    --info-text: #1e40af;
    --ok: #16a34a;
    --ok-bg: #dcfce7;
    --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --radius: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
    font: inherit;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    transition: background .15s, transform .05s;
}
button:active { transform: translateY(1px); }
button.primary {
    background: var(--primary);
    color: #fff;
}
button.primary:hover:not(:disabled) { background: var(--primary-hover); }
button.primary:disabled {
    background: var(--primary-disabled);
    cursor: not-allowed;
}
button.secondary {
    background: #eef2ff;
    color: var(--primary);
}
button.secondary:hover { background: #dbeafe; }
button.link {
    background: transparent;
    color: var(--muted);
    padding: 6px 10px;
}
button.link:hover { color: var(--text); text-decoration: underline; }

.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ==========================================================================
   TOPBAR
   ========================================================================== */

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 7px;
    font-size: 14px;
}
.brand-text { color: var(--text); }

.topnav {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.topnav-link {
    color: var(--muted);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.topnav-link:hover {
    color: var(--text);
    background: #f1f5f9;
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-link {
    color: var(--muted);
    padding: 6px 12px;
    text-decoration: none;
}
.btn-link:hover { color: var(--text); text-decoration: underline; }

.btn-primary-sm {
    background: var(--primary);
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.btn-primary-sm:hover { background: var(--primary-hover); text-decoration: none; }

.btn-secondary-sm {
    background: #eef2ff;
    color: var(--primary);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-secondary-sm:hover { background: #dbeafe; text-decoration: none; }

.btn-primary-lg {
    background: var(--primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}
.btn-primary-lg:hover { background: var(--primary-hover); text-decoration: none; }

.btn-link-lg {
    color: var(--primary);
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.btn-link-lg:hover { text-decoration: underline; }

.btn-primary-block {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
}
.btn-primary-block:hover:not(:disabled) {
    background: var(--primary-hover);
    text-decoration: none;
}
.btn-primary-block:disabled {
    background: var(--primary-disabled);
    cursor: not-allowed;
}

.btn-secondary-block {
    width: 100%;
    background: #eef2ff;
    color: var(--primary);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
}
.btn-secondary-block:hover { background: #dbeafe; text-decoration: none; }

/* ==========================================================================
   FLASH messages
   ========================================================================== */

.flash-wrap {
    max-width: 900px;
    margin: 16px auto -8px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}
.flash-info     { background: var(--info-bg); color: var(--info-text); }
.flash-error    { background: var(--danger-bg); color: var(--danger); }
.flash-warning  { background: var(--warn-bg); color: var(--warn-text); }
.flash-success  { background: var(--ok-bg); color: var(--ok); }

/* ==========================================================================
   MAIN
   ========================================================================== */

.main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 32px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.main-narrow { max-width: 480px; }
.main-landing { max-width: 1280px; padding: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 32px 28px 18px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.footer-brand { font-weight: 700; font-size: 14px; }
.footer-h {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 13px;
}
.footer-col a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-muted { color: var(--muted); font-size: 12px; }
.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

/* ==========================================================================
   HERO / LANDING
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f4f6fb 60%);
    padding: 64px 28px;
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.hero-lead {
    font-size: 17px;
    color: #374151;
    line-height: 1.55;
    margin: 0 0 28px;
    max-width: 540px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.hero-trust {
    color: var(--muted);
    font-size: 13px;
}

.hero-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    margin-left: auto;
}
.hero-card-h {
    font-weight: 600;
    font-size: 14px;
    color: var(--muted);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 4px;
}
.hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
}
.hero-row-ok { background: var(--ok-bg); }
.hero-row-bad { background: var(--danger-bg); }
.hero-name { font-weight: 500; font-size: 14px; }
.hero-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.hero-badge.ok  { background: var(--ok); color: #fff; }
.hero-badge.bad { background: var(--danger); color: #fff; }

.features {
    padding: 64px 28px;
    background: #fff;
}
.features-inner { max-width: 1100px; margin: 0 auto; }
.features h2 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 40px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.feature {
    padding: 24px;
    background: var(--bg);
    border-radius: var(--radius);
}
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.cta {
    padding: 64px 28px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    text-align: center;
}
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta h2 { margin: 0 0 12px; font-size: 28px; }
.cta p { margin: 0 0 28px; opacity: 0.9; font-size: 16px; }
.cta .btn-primary-lg {
    background: #fff;
    color: var(--primary);
}
.cta .btn-primary-lg:hover { background: #f1f5f9; }

/* ==========================================================================
   AUTH CARDS
   ========================================================================== */

.auth-card {
    background: var(--card-bg);
    padding: 36px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    margin: 32px auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-card-wide { max-width: 560px; }
.auth-card h1 {
    margin: 0 0 6px;
    font-size: 22px;
    text-align: center;
}
.auth-card .muted { text-align: center; }

.auth-info { text-align: center; }
.auth-info p { line-height: 1.55; }

.big-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--info-bg);
    color: var(--primary);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
}
.big-icon.ok  { background: var(--ok-bg); color: var(--ok); }
.big-icon.bad { background: var(--danger-bg); color: var(--danger); }

.resend-card {
    margin-top: 12px;
    padding: 14px;
    background: var(--info-bg);
    border-radius: 10px;
}
.resend-card p { margin: 0 0 8px; font-size: 13px; }
.resend-inline {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ==========================================================================
   FORM
   ========================================================================== */

.form { display: flex; flex-direction: column; gap: 14px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}
.field input,
.field select,
.field textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}
.field .hint {
    font-size: 12px;
    color: var(--muted);
}
.field .req { color: var(--danger); }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    line-height: 1.5;
}
.checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.form-footer {
    text-align: center;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}
.form-footer .dot { margin: 0 6px; }

/* ==========================================================================
   PAGE HEADERS / GENERIC
   ========================================================================== */

.page-header { margin-bottom: 8px; }
.page-header h1 { margin: 0 0 6px; font-size: 26px; }

/* ==========================================================================
   PLANS
   ========================================================================== */

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.plan {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.plan-pro {
    border: 2px solid var(--primary);
    position: relative;
}
.plan-pro::before {
    content: "Рекомендуем";
    position: absolute;
    top: -10px;
    right: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.plan-h {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.plan-price .amount { font-size: 32px; font-weight: 700; }
.plan-price .period { color: var(--muted); font-size: 14px; }
.plan-features {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.plan-features li {
    padding-left: 22px;
    position: relative;
    line-height: 1.5;
}
.plan-features li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--ok);
    font-weight: 700;
}
.plan-cta-form { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.plan-note { text-align: center; font-size: 13px; }

/* FAQ */
.faq { margin-top: 32px; }
.faq h2 { font-size: 22px; margin: 0 0 16px; }
.faq details {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: "+ ";
    color: var(--primary);
    font-weight: 700;
}
.faq details[open] summary::before { content: "− "; }
.faq details p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

/* ==========================================================================
   PROFILE
   ========================================================================== */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.profile-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.profile-card-wide { grid-column: 1 / -1; }
.profile-card-h {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--text);
}
.kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
    font-size: 14px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.sub-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.sub-status-trial    { background: var(--info-bg); color: var(--info-text); }
.sub-status-active   { background: var(--ok-bg); color: var(--ok); }
.sub-status-cancelled{ background: var(--warn-bg); color: var(--warn-text); }
.sub-status-expired  { background: var(--danger-bg); color: var(--danger); }

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.profile-table th,
.profile-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.profile-table th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
}

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--muted);
}
.pill-pending    { background: var(--warn-bg); color: var(--warn-text); }
.pill-succeeded  { background: var(--ok-bg); color: var(--ok); }
.pill-canceled   { background: var(--danger-bg); color: var(--danger); }
.pill-failed     { background: var(--danger-bg); color: var(--danger); }
.pill-done       { background: var(--ok-bg); color: var(--ok); }
.pill-processing { background: var(--info-bg); color: var(--info-text); }
.pill-uploading  { background: var(--info-bg); color: var(--info-text); }
.pill-error      { background: var(--danger-bg); color: var(--danger); }

/* ==========================================================================
   LEGAL
   ========================================================================== */

.legal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    line-height: 1.65;
    font-size: 15px;
}
.legal-long h2 {
    font-size: 18px;
    margin: 28px 0 8px;
    color: var(--text);
}
.legal-long p { margin: 8px 0; color: #374151; }
.legal-long ul { padding-left: 24px; color: #374151; }
.legal-long ul li { margin: 4px 0; }
.legal-long code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ==========================================================================
   APP — UPLOAD / DROPZONE / RESULTS
   ========================================================================== */

.upload-card, .progress, .results {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.upload-card h1 { margin: 0 0 6px; font-size: 22px; }

.dropzone {
    margin-top: 18px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    transition: background .15s, border-color .15s;
    cursor: pointer;
    background: #f8fafc;
}
.dropzone.hover {
    border-color: var(--primary);
    background: #eff6ff;
}
.dz-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dz-icon { font-size: 36px; }
.dz-text { font-size: 16px; color: var(--text); }
.dz-or { color: var(--muted); font-size: 13px; }
.dz-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.dz-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    max-width: 460px;
}

.file-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
}
.file-list li .name { flex: 1; word-break: break-all; }
.file-list li .meta { color: var(--muted); font-size: 12px; margin: 0 12px; }
.file-list li .remove {
    background: transparent;
    color: var(--muted);
    padding: 2px 8px;
    font-size: 16px;
}
.file-list li .remove:hover { color: var(--danger); }

.file-list li.ignored {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.file-list li.ignored .name { color: #9a3412; }
.file-list li .badge {
    background: #fed7aa;
    color: #9a3412;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upload-summary {
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}
.upload-summary strong { color: var(--text); }

.actions {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.actions .primary { padding: 12px 28px; font-weight: 600; min-width: 160px; }

.progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text { font-size: 16px; font-weight: 600; }
.progress-sub  { font-size: 13px; color: var(--muted); }

.results h2 { margin: 0 0 14px; font-size: 20px; }
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background: #fff;
    font-size: 14px;
}
.results-table th, .results-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.results-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    position: sticky;
    top: 0;
}
.results-table tbody tr:hover { background: #f8fafc; }
.cell-ok  { color: var(--ok);     text-align: center; font-size: 18px; }
.cell-bad { color: var(--danger); text-align: center; font-size: 18px; }

.wrong-header {
    margin: 28px 0 12px;
    color: var(--danger);
    font-size: 18px;
    font-weight: 700;
}
.wrong-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wrong-list > li {
    background: var(--danger-bg);
    border-left: 3px solid var(--danger);
    border-radius: 6px;
}
.wrong-list details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    color: var(--danger);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wrong-list details summary::-webkit-details-marker { display: none; }
.wrong-list details summary::before {
    content: "▶";
    transition: transform .15s;
    font-size: 10px;
    color: var(--danger);
}
.wrong-list details[open] summary::before { transform: rotate(90deg); }
.wrong-list details ul {
    margin: 0;
    padding: 4px 14px 12px 32px;
    color: #7f1d1d;
}
.wrong-list details ul li { padding: 2px 0; word-break: break-all; }
.wrong-list .no-files {
    padding: 10px 14px;
    color: var(--danger);
    font-weight: 600;
}

.all-ok {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--ok-bg);
    color: var(--ok);
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}
.results-actions { margin-top: 18px; text-align: center; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .topnav { display: none; }
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: 32px; }
    .hero-card { margin: 0 auto; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .topbar { padding: 12px 16px; gap: 12px; }
    .main { padding: 0 12px; margin-top: 18px; }
    .upload-card, .progress, .results { padding: 18px; }
    .dropzone { padding: 24px; }
    .actions { flex-direction: column; align-items: stretch; }
    .actions .primary { min-width: 0; width: 100%; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .hero, .features, .cta { padding: 40px 18px; }
    .hero h1 { font-size: 26px; }
    .legal-card { padding: 22px; }
}
