===== assets/style.css (проект #344) =====
:root {
    --brand: #1a73e8;
    --brand-2: #0d5bbd;
    --accent: #ea4335;
    --bg: #f8f9fa;
    --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    height: var(--header-height);
}

.logo {
    font-size: var(--step-2);
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: var(--space-4);
    margin-right: auto;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-2);
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--surface);
    color: var(--brand);
}

.nav-link.active {
    color: var(--brand);
    background: var(--surface);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-name {
    font-size: var(--step--1, 0.85rem);
    color: var(--muted);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
}

.burger.is-active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.burger.is-active span:nth-child(2) {
    opacity: 0;
}

.burger.is-active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: var(--space-4);
        box-shadow: var(--shadow-2);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
    }

    .main-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

/* Hero */
.hero {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(26,115,232,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-8);
    align-items: center;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 var(--space-4);
    color: var(--text);
    letter-spacing: -0.03em;
}

.hero-lead {
    font-size: var(--step-1);
    color: var(--muted);
    margin: 0 0 var(--space-6);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero-visual img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-3);
    box-shadow: var(--shadow-3);
    border: 3px solid var(--border);
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }
}

/* Sections */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 var(--space-3);
    letter-spacing: -0.02em;
}

.section-intro {
    text-align: center;
    font-size: var(--step-1);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

/* Demo Section */
.demo-section {
    background: var(--surface);
}

.demo-frame {
    border-radius: var(--radius-3);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    border: 2px solid var(--border);
}

.demo-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Examples */
.examples-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
    align-items: center;
}

.example-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
    position: relative;
}

.example-label {
    position: absolute;
    top: calc(var(--space-3) * -1);
    left: var(--space-4);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    font-size: var(--step--1, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-label--before {
    background: var(--muted);
    color: var(--bg);
}

.example-label--after {
    background: var(--brand);
    color: white;
}

.example-content {
    margin-top: var(--space-3);
    font-size: var(--step-0);
    line-height: 1.7;
}

.example-arrow {
    color: var(--brand);
}

@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }

    .example-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-6);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
    border-color: var(--brand);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: white;
    border-radius: var(--radius-2);
    margin-bottom: var(--space-4);
}

.feature-title {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

.feature-desc {
    font-size: var(--step-0);
    color: var(--muted);
    margin: 0;
}

/* Task Types */
.task-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.task-type-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
    text-align: center;
    transition: all var(--transition);
}

.task-type-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-1);
}

.task-type-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.task-type-title {
    font-size: var(--step-0);
    font-weight: 600;
    margin: 0 0 var(--space-1);
}

.task-type-desc {
    font-size: var(--step--1, 0.85rem);
    color: var(--muted);
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: var(--grad);
    color: white;
}

.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 var(--space-3);
}

.cta-text {
    font-size: var(--step-1);
    margin: 0 0 var(--space-5);
    opacity: 0.95;
}

.btn-large {
    padding: var(--space-4) var(--space-7);
    font-size: var(--step-1);
}

/* Constructor Page */
.constructor-page {
    padding: 0;
}

.constructor-container {
    display: grid;
    grid-template-columns: 480px 1fr;
    height: calc(100vh - var(--header-height));
}

.constructor-panel {
    overflow-y: auto;
    padding: var(--space-6);
}

.constructor-panel--form {
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.constructor-panel--result {
    background: var(--bg);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: var(--step-2);
    font-weight: 700;
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--surface-2);
    border-color: var(--brand);
}

/* Form */
.constructor-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-4);
}

.form-section:last-child {
    border-bottom: none;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-2);
    font-size: var(--step-0);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    font-family: inherit;
    font-size: var(--step-0);
    transition: all var(--transition);
    background: var(--bg);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Block Toggle */
.block-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.block-toggle-label {
    font-weight: 600;
    font-size: var(--step-0);
    cursor: pointer;
}

.block-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.block-content {
    margin-top: var(--space-3);
}

.block-toggle input[type="checkbox"]:not(:checked) ~ .block-content,
.block-toggle input[type="checkbox"]:not(:checked) + label + .block-content {
    display: none;
}

/* Result Box */
.result-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-6);
    min-height: 400px;
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--step-0);
    line-height: 1.8;
    white-space: pre-wrap;
}

.result-placeholder {
    color: var(--muted);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    font-family: inherit;
}

/* Templates */
.category-filter {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.category-btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: var(--step--1, 0.85rem);
    transition: all var(--transition);
}

.category-btn:hover {
    border-color: var(--brand);
    background: var(--surface);
}

.category-btn.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
}

.template-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
    transition: all var(--transition);
}

.template-card:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
    border-color: var(--brand);
}

.template-category {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: var(--brand);
    color: white;
    border-radius: var(--radius-1);
    font-size: var(--step--1, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.template-title {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0 0 var(--space-2);
}

.template-desc {
    font-size: var(--step-0);
    color: var(--muted);
    margin: 0 0 var(--space-4);
}

/* Page Header */
.page-header {
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 var(--space-2);
}

.page-intro {
    font-size: var(--step-1);
    color: var(--muted);
    margin: 0;
}

.breadcrumb {
    font-size: var(--step--1, 0.85rem);
    color: var(--muted);
    margin-bottom: var(--space-3);
}

.breadcrumb a {
    color: var(--brand);
    text-decoration: none;
}

/* Template View */
.template-view-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-7);
}

.template-preview h2 {
    font-size: var(--step-2);
    font-weight: 600;
    margin: 0 0 var(--space-4);
}

.prompt-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-6);
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--step-0);
    line-height: 1.8;
    white-space: pre-wrap;
    margin-bottom: var(--space-5);
}

.template-actions {
    display: flex;
    gap: var(--space-3);
}

.template-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    align-self: start;
}

.template-meta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
}

.template-meta h3 {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0 0 var(--space-3);
}

.template-blocks-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-blocks-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--step-0);
}

.template-blocks-list li:last-child {
    border-bottom: none;
}

/* Improve Page */
.improve-form {
    max-width: 800px;
    margin: 0 auto var(--space-7);
}

.form-group {
    margin-bottom: var(--space-4);
}

.improve-result {
    max-width: 900px;
    margin: 0 auto;
}

.improve-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.improve-result-header h2 {
    font-size: var(--step-2);
    font-weight: 600;
    margin: 0;
}

.improved-prompt {
    background: var(--surface);
    border: 2px solid var(--brand);
    border-radius: var(--radius-2);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.8;
}

.suggestions-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.suggestions-box h3 {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0 0 var(--space-3);
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    padding: var(--space-2) 0 var(--space-2) var(--space-5);
    position: relative;
    font-size: var(--step-0);
}

.suggestions-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}

.improve-actions {
    text-align: center;
}

/* Kabinet */
.tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: var(--space-3) var(--space-5);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.tab:hover {
    color: var(--brand);
}

.tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.prompt-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: var(--space-5);
}

.prompt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-3);
}

.prompt-item-title {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0;
}

.prompt-item-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--step--1, 0.85rem);
    color: var(--muted);
}

.prompt-date {
    white-space: nowrap;
}

.prompt-type {
    padding: var(--space-1) var(--space-2);
    background: var(--surface-2);
    border-radius: var(--radius-1);
}

.prompt-item-preview {
    font-size: var(--step-0);
    color: var(--muted);
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.prompt-item-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-danger {
    color: var(--accent);
}

.btn-danger:hover {
    background: var(--accent);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--muted);
}

.empty-state p {
    font-size: var(--step-1);
    margin-bottom: var(--space-4);
}

/* Prompt Display Box */
.prompt-display-box {
    max-width: 900px;
    margin: 0 auto var(--space-6);
}

.prompt-display-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.prompt-display-header h2 {
    font-size: var(--step-2);
    font-weight: 600;
    margin: 0;
}

.prompt-actions {
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[hidden] {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-3);
    box-shadow: var(--shadow-3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--muted);
}

.modal-form {
    padding: var(--space-5);
}

.modal-footer {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding: var(--space-5);
    border-top: 1px solid var(--border);
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-8) 0 var(--space-5);
    margin-top: var(--space-10);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-7);
    margin-bottom: var(--space-6);
}

.footer-logo {
    font-size: var(--step-2);
    font-weight: 700;
    color: var(--brand);
    margin-bottom: var(--space-3);
}

.footer-desc {
    font-size: var(--step-0);
    color: var(--muted);
    margin: 0;
}

.footer-title {
    font-size: var(--step-0);
    font-weight: 600;
    margin: 0 0 var(--space-3);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: var(--step-0);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--brand);
}

.footer-bottom {
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-copy {
    font-size: var(--step--1, 0.85rem);
    color: var(--muted);
    margin: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .constructor-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .constructor-panel {
        height: auto;
    }

    .template-view-layout {
        grid-template-columns: 1fr;
    }

    .template-sidebar {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Недостающие дизайн-токены (значения из theme.css платформы) --- */
:root{
  --text: #14141c;
  --container: 1160px;
  --space-4: 16px;
  --space-8: 64px;
  --border: #e7e7ef;
  --space-6: 32px;
  --step-2: clamp(1.45rem, 1.3rem + .9vw, 1.9rem);
  --space-2: 8px;
  --space-3: 12px;
  --radius-2: 16px;
  --surface: #ffffff;
  --muted: #6a6a7b;
  --shadow-2: 0 1px 2px rgba(20, 20, 40, .06), 0 10px 24px rgba(20, 20, 40, .08);
  --space-10: 128px;
  --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
  --radius-3: 22px;
  --shadow-3: 0 2px 4px rgba(20, 20, 40, .06), 0 24px 60px rgba(20, 20, 40, .14);
  --space-5: 24px;
  --space-1: 4px;
  --radius-pill: 999px;
  --step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
  --shadow-1: 0 1px 2px rgba(20, 20, 40, .06);
  --space-7: 48px;
  --surface-2: #f1f1f7;
  --radius-1: 10px;
}

/* --- Недостающие дизайн-токены (значения из theme.css платформы) --- */
:root{
  --font-sans: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: var(--step-0, clamp(1rem, .96rem + .2vw, 1.125rem));
  --line-height: 1.6;
}
