:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #1c1f24;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --border: #e5e7eb;
    --highlight: #fef3c7;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar .logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

.topbar nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
}

.topbar nav a:hover { color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 48px 24px 96px; }

.hero { text-align: center; padding: 64px 0 32px; }
.hero h1 { font-size: 44px; margin: 0 0 16px; line-height: 1.15; }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 auto 32px; }
.hero-meta { color: var(--muted); font-size: 13px; margin-top: 16px; }

.badge-free {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all .15s ease;
}
.cta.big { padding: 16px 32px; font-size: 17px; }
.cta.primary { background: var(--accent); color: #fff; }
.cta.primary:hover { background: var(--accent-dark); }
.cta.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.cta.ghost:hover { border-color: var(--accent); }

section { margin-top: 64px; }
section h2 { font-size: 28px; margin-bottom: 24px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.price-card { text-align: left; display: flex; flex-direction: column; position: relative; }
.price-card h3 { font-size: 20px; }
.price-card .price { font-size: 32px; font-weight: 700; margin: 8px 0 12px; color: var(--text); }
.price-card .cta { margin-top: auto; align-self: stretch; text-align: center; }
.price-card.highlight { background: var(--highlight); border-color: #fcd34d; }
.price-card.free-card { border-color: #86efac; background: #f0fdf4; }
.price-card.free-card h3 { color: #15803d; }
.price-card.free-card .price { color: #15803d; }

.price-tag {
    position: absolute;
    top: -10px;
    right: 16px;
    background: #16a34a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.price-tag.pro { background: #f59e0b; }

.problem h3 { color: var(--text); font-size: 16px; line-height: 1.35; }
.problem p { margin-top: 8px; color: var(--muted); font-size: 14px; }

.check-list { list-style: none; padding: 0; margin: 12px 0; }
.check-list li {
    padding: 4px 0 4px 24px;
    position: relative;
    color: var(--muted);
    font-size: 14px;
}
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 4px;
    color: #16a34a;
    font-weight: 700;
}
.check-list.small li { font-size: 13px; }

.faq { max-width: 760px; margin-left: auto; margin-right: auto; }
.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] { background: #fafbfc; }
.faq details p { margin-top: 12px; color: var(--muted); }

.download-page h2.platform-title { margin-top: 32px; font-size: 22px; }
.download-list { list-style: none; padding: 0; margin: 16px 0; }
.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.download-name {
    display: block;
    font-weight: 600;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
}
.download-name:hover { color: var(--accent); }
.download-info {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.download-info span { margin-right: 4px; }
.empty-state {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}
.empty-state code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.note-block {
    margin-top: 24px;
    padding: 16px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}
.note-block code { background: #fef3c7; padding: 1px 6px; border-radius: 4px; font-size: 13px; }

.projects-list { display: grid; gap: 14px; margin-top: 28px; }
.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.project-item h2 {
    margin: 6px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}
.project-item p {
    margin: 0 0 10px;
    color: var(--muted);
}
.project-tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
}
.project-url {
    color: var(--accent);
    font-size: 14px;
    word-break: break-all;
    text-decoration: none;
}
.project-url:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.result { max-width: 720px; margin: 0 auto; }
.result h1 { font-size: 28px; }
.result .lead { color: var(--muted); }

.key-box {
    margin: 24px 0;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.key-box label { display: block; font-weight: 600; margin-bottom: 8px; }
.key-box textarea {
    width: 100%;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    background: #fafafa;
}
.key-box button {
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.meta { margin: 16px 0; padding: 16px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); }
.meta p { margin: 4px 0; }

.note { margin-top: 24px; padding: 16px; background: #fffbeb; border-left: 3px solid #f59e0b; border-radius: 4px; }

.recover-form { margin: 24px 0; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.recover-form input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
}
.recover-form button { align-self: flex-start; cursor: pointer; border: none; }

.legal-confirm-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}
.buy-summary { margin-top: 20px; }
.buy-summary h2 { margin: 0; }
.buy-summary .price {
    margin: 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}
.check-row.compact {
    padding: 10px 12px;
    font-size: 13px;
}
.check-row input { margin-top: 4px; }
.check-row a { color: var(--accent); }

.error { color: #b91c1c; padding: 12px; background: #fef2f2; border-radius: 6px; }

footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
footer p { margin: 4px 0; }
footer .legal-links { margin-top: 12px; font-size: 14px; }
footer .legal-links a { color: var(--accent); text-decoration: none; }
footer .legal-links a:hover { text-decoration: underline; }

/* Юридические страницы (privacy, terms) */
.legal {
    max-width: 820px;
    margin: 32px auto;
    padding: 32px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.legal h1 { font-size: 28px; line-height: 1.25; margin-top: 0; }
.legal h2 { margin-top: 32px; font-size: 20px; }
.legal h3 { margin-top: 20px; font-size: 17px; color: var(--muted); }
.legal p, .legal li { font-size: 15px; }
.legal .effective-date { color: var(--muted); }
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
    font-size: 14px;
}
.legal-table th, .legal-table td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.legal-table th {
    background: var(--bg);
    font-weight: 600;
    width: 30%;
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
    }

    .topbar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .topbar nav a { margin-left: 0; }
    main { padding: 32px 18px 72px; }
    .hero h1 { font-size: 34px; }

    .project-item {
        align-items: stretch;
        flex-direction: column;
    }

    .project-item .cta { text-align: center; }
}
