/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
/* Рабочая мастерская: единая навигация, контекст задачи и раскрываемые дополнительные действия. */
.project-view .project-titlebar{padding:22px 30px 18px;gap:20px;align-items:center}
.project-view .project-heading h1{font-size:26px;line-height:1.25;letter-spacing:-.7px;margin:7px 0 8px}
.project-view .project-title-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}
.project-view .project-title-actions>.button{font-size:12px;min-height:40px;padding:10px 14px;border-radius:12px}
.project-tabs.workspace-project-nav{position:sticky;top:74px;z-index:15;display:flex;align-items:stretch;height:auto;gap:4px;padding:6px;margin:0 30px 20px;background:var(--surface);border:1px solid var(--line-strong);border-radius:14px;box-shadow:0 3px 12px #20232904;overflow-x:auto}
.workspace-project-nav .project-tab{flex:1 0 142px;min-width:0;min-height:58px;gap:9px;padding:10px 12px;border:0;border-radius:9px;text-align:left;background:transparent;white-space:normal;transition:background .15s,color .15s}
.workspace-project-nav .project-tab.active{background:var(--accent-soft);color:var(--purple)}
.workspace-project-nav .project-tab:hover{background:var(--surface-hover)}
.workspace-project-nav .project-tab.active:hover{background:var(--accent-soft)}
.workspace-project-nav .project-tab>.icon{width:17px;height:17px;flex-shrink:0}
.workspace-project-nav .project-tab>span:not(.count-badge){display:flex;min-width:0;flex-direction:column;gap:3px}
.workspace-project-nav strong{font-size:12px;font-weight:650;line-height:1.3;white-space:nowrap}
.workspace-project-nav small{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.4;color:var(--muted);font-weight:400}
.workspace-project-nav .count-badge{font-size:10px;margin-left:auto;padding:2px 6px;min-width:20px}
.workspace-project-nav .project-tab:focus-visible,.workspace-manual-tools>summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:-2px}
.workspace-screen-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 14px}
.workspace-screen-heading h2,.cards-panel>.figma-intro h2{font-size:26px;line-height:1.25;letter-spacing:-.7px;margin:8px 0}
.workspace-screen-heading p,.cards-panel>.figma-intro p{margin:0;font-size:13px;line-height:1.6;color:var(--muted);max-width:730px}
.workspace-screen-heading>.button{font-size:12px;min-height:40px;padding:10px 14px;border-radius:12px;flex-shrink:0}
.workspace-connection-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0 14px;border-bottom:1px solid var(--line-strong);font-size:11px;color:var(--muted);margin:0 0 16px}
#figma-setup-summary{display:flex;align-items:center;gap:7px;color:var(--text)}
#figma-setup-summary::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--color-soft);flex-shrink:0}
#figma-setup-summary.is-online::before{background:var(--green)}
.workspace-setup-panel{padding:20px;border:1px solid var(--line-strong);border-radius:16px;background:var(--surface);margin:0 0 20px}
.workspace-setup-panel .figma-setup-guide{margin:0 0 18px;gap:16px}
.workspace-setup-panel .figma-setup-guide>div{padding:16px;border-radius:12px}
.workspace-setup-panel .figma-setup-guide h3{font-size:16px;margin:7px 0}
.workspace-setup-panel .figma-setup-guide p{font-size:12px;line-height:1.65}
.workspace-setup-panel .figma-source-card{border:0;box-shadow:none;margin:0;border-radius:0}
.workspace-setup-panel .figma-plugin-setup{padding:18px 0 0;gap:24px}
.workspace-setup-panel .figma-plugin-setup h3{font-size:17px}
.workspace-setup-panel .figma-plugin-setup p,.workspace-setup-panel .figma-plugin-setup li{font-size:12px;line-height:1.7}
.workspace-setup-panel .figma-pairing{padding:18px;border-radius:12px}
.has-saved-layout .figma-results-heading{margin:0 0 12px}
.has-saved-layout .figma-results-heading h3{font-size:15px}
.has-saved-layout .figma-results-heading p{font-size:11px}
.has-saved-layout .figma-history-wrap{margin:0 0 14px;padding:12px 14px;border-radius:12px}
.has-saved-layout .figma-snapshot-header{margin:0 0 14px;padding:14px 16px;border:1px solid var(--line-strong);border-radius:12px;align-items:center;gap:16px}
.has-saved-layout .figma-snapshot-header h3{font-size:17px;margin:6px 0}
.has-saved-layout .figma-snapshot-header p{font-size:11px;margin:0}
.has-saved-layout .figma-stats{gap:14px}
.has-saved-layout .figma-stats span{font-size:10px}
.has-saved-layout .figma-stats strong{font-size:16px}
.cards-panel>.figma-intro{padding:0;margin:0 0 20px}
.cards-panel .cards-layout{grid-template-columns:240px minmax(0,1fr);gap:22px;align-items:start}
.cards-panel .cards-sidebar{padding:16px;border:1px solid var(--line-strong);border-radius:14px;background:var(--canvas);min-width:0}
.cards-panel .cards-sidebar>h3{font-size:14px;margin:0 0 14px}
.cards-panel .card-workspace{min-width:0;padding:0}
.cards-panel .card-titlebar{padding:0 0 18px;margin:0 0 18px;border-bottom:1px solid var(--line-strong)}
.cards-panel .card-titlebar h3{font-size:23px;line-height:1.3}
.cards-panel .card-titlebar p{font-size:12px}
.cards-panel .card-slides-heading{margin:0 0 14px;gap:12px}
.cards-panel .card-slides-heading .button{min-height:36px;padding:8px 12px;font-size:11px;border-radius:10px}
.cards-panel .card-slides{gap:16px;grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.workspace-manual-tools{border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);padding:13px 14px;margin:16px 0}
.workspace-manual-tools>summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--muted);list-style-position:inside}
.workspace-manual-tools[open]>summary{color:var(--text);margin-bottom:14px}
.cards-sidebar .workspace-manual-tools{padding:12px;margin:16px 0 0}
.cards-sidebar .workspace-manual-tools form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
.cards-sidebar .workspace-manual-tools label{margin:0;font-size:12px}
.cards-sidebar .workspace-manual-tools input{min-width:0;width:100%;font-size:13px;padding:9px 10px;min-height:38px}
.cards-sidebar .workspace-manual-tools .button{font-size:12px;min-height:38px;padding:9px 12px}
#card-manual-tools .slide-save-form{margin:0;padding:16px;border-radius:10px;border:0;background:var(--canvas)}
@media(max-width:1200px){.workspace-project-nav .project-tab{flex-basis:136px;padding:9px 10px}.workspace-project-nav strong{font-size:11px}.workspace-project-nav .project-tab>.icon{display:none}.workspace-connection-summary{align-items:flex-start}.workspace-connection-summary>span:last-child{max-width:200px;text-align:right}.cards-panel .cards-layout{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:800px){.project-view .project-titlebar{padding:18px;flex-wrap:wrap}.project-tabs.workspace-project-nav{top:65px;margin:0 16px 18px}.workspace-screen-heading{align-items:flex-start;flex-wrap:wrap}.workspace-screen-heading h2,.cards-panel>.figma-intro h2{font-size:23px}.workspace-connection-summary{flex-wrap:wrap}.workspace-connection-summary>span:last-child{max-width:none;text-align:left}.workspace-setup-panel{padding:14px}.cards-panel .cards-layout{grid-template-columns:minmax(0,1fr)}.cards-panel .cards-sidebar{position:static}.cards-panel .card-slides{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}

/* Прокрутка учитывает шапку и закреплённую навигацию проекта. */
.project-view :is(#figma-panel,#production-panel,#cards-panel,#prod-editor-view,#prod-workspace-navigation,#prod-data-section,#prod-table-view,#prod-template-section){scroll-margin-top:160px}
.workspace-scan-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px}
.workspace-scan-toolbar>.button{font-size:11px;min-height:34px;padding:7px 12px;flex-shrink:0}
.workspace-scan-history{min-width:0;flex:1;font-size:12px;color:var(--muted)}
.workspace-scan-history>summary{cursor:pointer;padding:9px 0}
.workspace-scan-history[open]{padding:0 14px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface)}
.workspace-scan-history .figma-results-heading{padding:8px 0 0}
.workspace-scan-history .figma-history-wrap{padding:0;margin:0}
.workspace-snapshot-details{margin:18px 0 12px;color:var(--muted);font-size:12px}
.workspace-snapshot-details>summary{cursor:pointer;padding:12px 0}
.workspace-snapshot-details .figma-snapshot-header{margin-top:8px}
.has-saved-layout .fw-heading .section-kicker{display:none}
.has-saved-layout .fw-heading{margin-bottom:16px}
.has-saved-layout .fw-heading h3{font-size:22px;margin:0 0 7px}
@media(max-width:800px){.project-view :is(#figma-panel,#production-panel,#cards-panel,#prod-editor-view,#prod-workspace-navigation,#prod-data-section,#prod-table-view,#prod-template-section){scroll-margin-top:148px}.workspace-scan-toolbar{gap:10px}}
/* Четыре входа и компактный, явно запускаемый следующий шаг. */
.project-source-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.project-source-choice .source-choice{min-height:92px;align-items:center;text-align:left;padding:16px 18px}
.project-source-choice .source-choice strong{font-size:14px}
.project-source-choice .source-choice small{font-size:12px;line-height:1.5}
/* Основное действие начала работы видно на ноутбуке без лишней прокрутки. */
@media(min-width:801px){
 .new-project-view .new-project-content{margin-top:22px;margin-bottom:36px;padding-top:0}
 .new-project-content h1{font-size:36px;line-height:1.2;margin-top:12px;margin-bottom:12px;letter-spacing:-1px}
 .new-project-content .hero-description{font-size:14px;line-height:1.6}
 .new-project-content .create-project-form{margin-top:18px}
 .new-project-content .project-source-choice{margin-bottom:16px}
 .new-project-content .source-choice{min-height:72px;padding:12px 16px}
 .new-project-content .new-manual-note{padding:12px 16px;line-height:1.6;margin-bottom:12px}
 .new-project-content .marketplace-start{padding:14px 16px;margin-bottom:16px}
 .new-project-content .create-project-form>input{margin-bottom:12px}
 .new-project-content .format-summary{margin:12px 0;padding:10px 14px}
 .new-project-content .new-project-options{margin:14px 0 16px}
 .new-project-content .create-submit-row{margin-top:16px}
 .new-project-content .new-project-next{margin-top:18px;padding-top:12px}
}
#new-figma-fields{margin:16px 0 22px}
#new-figma-fields>small{display:block;font-size:12px;line-height:1.5;color:var(--muted);margin-top:8px}
@media(min-width:801px){.new-project-content #new-figma-fields{margin:10px 0 12px}}
.workspace-route{position:relative;display:flex;align-items:center;gap:16px;margin:0 30px 18px;padding:13px 16px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface)}
.workspace-route-copy{flex:1;min-width:0}
.workspace-route-copy .section-kicker{display:none}
.workspace-route-copy>strong{font-size:13px;line-height:1.4}
.workspace-route-copy>p{margin:4px 0 0;font-size:11px;line-height:1.5;color:var(--muted);max-width:900px}
#project-next-action{flex-shrink:0;min-height:36px;padding:8px 12px;font-size:12px}
#project-route-help{flex-shrink:0;font-size:11px;color:var(--muted)}
#project-route-help>summary{cursor:pointer;white-space:nowrap;padding:10px 0}
#project-route-help[open]{position:relative;max-width:500px;align-self:flex-start}
#project-route-help ol{font-size:12px;line-height:1.6;margin:12px 0 0;padding-left:18px}
#project-route-help li+li{margin-top:7px}
#project-route-help>p{font-size:11px;line-height:1.6;margin:12px 0 0}
.workspace-assets-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px}
.workspace-assets-heading>div{flex:1;min-width:240px}
.workspace-assets-heading h2{font-size:22px;margin:0 0 7px}
.workspace-assets-heading p{font-size:12px;line-height:1.6;color:var(--muted);margin:0;max-width:650px}
.workspace-assets-heading>.button{font-size:12px;min-height:36px;padding:8px 12px}
.workspace-assets-heading>.text-button{font-size:12px}
.workspace-asset-hint{font-size:11px;line-height:1.65;margin:0 0 18px;color:var(--muted)}
.project-view .save-state{font-size:11px;max-width:220px;line-height:1.5}
@media(max-width:1200px){.workspace-route{flex-wrap:wrap}.workspace-route-copy{min-width:55%}#project-route-help[open]{max-width:none;width:100%}}
@media(max-width:800px){.workspace-route{margin-left:16px;margin-right:16px}.project-source-choice{grid-template-columns:1fr}.workspace-route-copy{min-width:100%}}

@media(min-width:801px) and (max-width:1500px){.workspace-assets-heading>div{flex-basis:100%}.workspace-assets-heading>.button,.workspace-assets-heading>.text-button{margin-top:0}}

/* Компактная шапка оставляет товар в первом экране ПК. */
@media(min-width:1101px){
 .project-view .project-titlebar{padding:14px 30px;gap:14px}
 .project-view .project-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 12px;min-width:0}
 .project-view .project-heading .breadcrumb{grid-column:1/-1;margin:0;font-size:10px;line-height:1.4}
 .project-view .project-heading h1{margin:0;font-size:24px;line-height:1.2;letter-spacing:-.6px}
 .project-view .project-format-badge{margin:0;font-size:10px;padding:5px 8px;white-space:nowrap}
 .workspace-route{padding-top:10px;padding-bottom:10px}
 #prod-table-view .production-table-hint{font-size:12px;line-height:1.5;margin-bottom:10px}
}

/* Сводка проектов сохраняет читаемость и границы узкого экрана. */
.designer-summary>div{min-width:0;grid-template-columns:40px minmax(0,1fr)}
.designer-summary strong,.designer-summary span{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.designer-summary{grid-template-columns:minmax(0,1fr);gap:10px}.designer-summary>div{padding:14px 16px}}

/* Просмотр источника по ссылке отделён от сохранённого снимка с PNG. */
.figma-link-preview{border:1px solid var(--line-strong);border-radius:16px;background:var(--surface);overflow:hidden;margin:0 0 22px}
.figma-link-preview>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px}
.figma-link-preview h3{margin:7px 0;font-size:20px;line-height:1.25}
.figma-link-preview p{margin:0;color:var(--muted);font-size:12px;line-height:1.65;max-width:760px}
.figma-link-preview .button{font-size:12px;min-height:38px;padding:10px 14px;flex-shrink:0}
.figma-link-preview-stage{height:clamp(320px,55vh,640px);background:var(--canvas);border-block:1px solid var(--line-strong)}
.figma-link-preview-stage iframe{display:block;width:100%;height:100%;border:0}
.figma-link-import{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:18px 20px}
.figma-link-import>div{flex:1 1 300px;min-width:0}
.figma-link-import strong{display:block;font-size:14px;margin-bottom:5px}
.figma-link-access{margin:0 20px 20px}
.figma-link-access p{margin-top:8px}
@media(max-width:800px){.figma-link-preview>header{flex-wrap:wrap;padding:16px}.figma-link-import{padding:16px}.figma-link-access{margin:0 16px 16px}.figma-link-preview-stage{height:380px}.figma-link-import .button{flex:1 1 200px}}

.figma-link-preview .figma-link-access-note{margin:0 20px 10px;font-size:11px;max-width:none}
@media(max-width:800px){.project-view .project-title-actions{flex:1 1 100%;min-width:0;max-width:100%;justify-content:flex-start}}

/* В основном маршруте только плагин; API доступно отдельным раскрытием. */
.figma-advanced{margin-top:20px;padding:14px 16px;border:1px solid var(--line-strong);border-radius:12px;background:var(--canvas)}
.figma-advanced>summary{cursor:pointer;color:var(--muted);font-size:12px;line-height:1.5}
.figma-advanced>p{font-size:12px;color:var(--muted);line-height:1.65;margin:12px 0}
.figma-plugin-heading{padding-bottom:8px;border-bottom:1px solid var(--line-strong)}
.figma-plugin-heading .text-button{font-size:13px;font-weight:600}
.figma-link-import{border-top:1px solid var(--line-strong);background:var(--accent-soft)}
.figma-link-import .figma-link-project{margin-top:10px;font-size:12px;overflow-wrap:anywhere}
.figma-link-import .figma-link-project strong{display:inline;font-size:12px;margin:0}
#figma-link-plugin-status{margin-top:5px;font-size:11px}

/* Архив — отдельное место для завершённых работ; данные остаются доступны. */
.projects-archive-button { justify-content:flex-start; width:100%; margin:12px 0; gap:9px; }
.projects-archive-button[aria-pressed="true"] { color:var(--purple); background:var(--accent-soft); }
.projects-archive-button .count-badge { margin-left:auto; }
.archive-restore-button { margin:0 16px 16px; }
.project-context-card:has(.archive-restore-button) > .home-project-card { height:auto; }
.project-archive-banner { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 20px; margin:0 0 18px; border:1px solid var(--accent-line); border-radius:14px; background:var(--accent-soft); }
.project-archive-banner[hidden] { display:none; }
.project-archive-banner strong { font-size:15px; }
.project-archive-banner p { margin:5px 0 0; font-size:13px; color:var(--muted); line-height:1.5; }
.project-archive-banner .button { flex-shrink:0; }
#home-projects[aria-busy="true"] { opacity:.55; pointer-events:none; }
@media(max-width:700px) { .project-archive-banner { align-items:flex-start; flex-direction:column; } .object-confirm-dialog { padding:22px; } .object-name-actions { flex-wrap:wrap; } }

.project-cleanup-status { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin:0 0 20px; font-size:14px; line-height:1.6; }
.project-cleanup-status[hidden] { display:none; }
.project-cleanup-status .text-button { flex-shrink:0; }

/* Готовый результат: сначала получение файлов, затем просмотр и история. */
.cards-panel .card-result-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:16px 18px;border:1px solid var(--accent-line);border-radius:14px;background:var(--accent-soft)}
.card-result-toolbar>div:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.card-result-toolbar strong{font-size:14px;line-height:1.5}
.card-result-toolbar p{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.card-result-toolbar .button{font-size:13px;min-height:42px;padding:10px 16px;white-space:nowrap}
.card-result-status{display:flex;align-items:center;gap:10px;padding:0 0 18px;margin:0}
.card-result-status[hidden]{display:none}
.cards-panel .card-slides-heading{flex-wrap:wrap}
.cards-panel .card-slides-heading>span{font-size:11px;line-height:1.5}
.cards-panel .card-slides{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}
.cards-panel .card-slide{border-color:var(--line-strong);background:var(--surface)}
.cards-panel .card-slide-info>strong{font-size:12px;line-height:1.5}
.cards-panel .card-slide-info>small{font-size:11px;line-height:1.5}
.card-slide-tools{margin-top:10px}
.card-slide-tools>summary{cursor:pointer;font-size:12px;line-height:1.5;color:var(--purple)}
.card-slide-tools>div{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:12px}
.cards-panel .card-slide-tools a{font-size:12px;color:var(--purple)}
.cards-panel .card-slide-download{margin-top:10px;font-size:12px;color:var(--purple);min-height:32px}
.cards-panel .card-revisions{font-size:11px;border-color:var(--line-strong)}
.cards-panel .card-archives{font-size:12px;border-color:var(--line-strong);padding-top:16px;margin-top:20px}
.card-archives>summary{cursor:pointer;color:var(--muted);padding:4px 0}
.card-archive-list strong{overflow-wrap:anywhere}
.preview-toolbar .preview-gallery[hidden]{display:none}
.preview-toolbar:has(.preview-gallery:not([hidden])){flex-wrap:wrap;gap:10px}
.preview-toolbar:has(.preview-gallery:not([hidden]))>#preview-help{flex-basis:100%;order:3}
.preview-gallery output{min-width:60px}
@media(max-width:800px){.cards-panel .card-result-toolbar{flex-wrap:wrap;padding:14px}.card-result-toolbar>div:last-child{width:100%}.card-result-toolbar .button{width:100%;white-space:normal}.cards-panel .card-slides{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.preview-toolbar:has(.preview-gallery:not([hidden]))>#preview-help{display:none}}

.figma-plugin-setup .figma-plugin-version-note { margin-top:12px; max-width:620px; font-size:12px; line-height:1.65; color:var(--muted); }
/* Обзор: компактная карточка проекта без пустой вертикальной колонки. */
.workspace .home-projects .home-project-card { min-height:164px; padding:16px; }
.workspace .home-projects .home-card-top { margin-bottom:12px; }
.workspace .home-projects .home-card-bottom { margin-top:12px; padding-top:10px; }
@media(min-width:1101px) {
 .cards-panel { padding-top:20px; padding-bottom:28px; }
 .cards-panel .card-titlebar { padding-bottom:12px; margin-bottom:12px; }
 .cards-panel .card-result-toolbar { padding:12px 16px; margin-bottom:12px; }
}
}
