:root{--bg:oklch(0.985 0 0);--surface:oklch(1 0 0);--ink:oklch(.25 .01 230);--muted:oklch(.48 .012 230);--line:oklch(.9 .008 230);--primary:oklch(.43 .075 230);--selected:oklch(.94 .02 230);--side:oklch(.97 .004 230);--peach:oklch(.94 .034 50);--blue:oklch(.94 .022 235);--rose:oklch(.94 .035 15);--yellow:oklch(.95 .036 85);--green:oklch(.94 .028 150);--lilac:oklch(.94 .027 295);--focus:oklch(.46 .09 230)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}button,input{font:inherit}a{color:inherit;text-decoration:none}button{cursor:pointer}img{width:22px;height:22px;display:block;flex-shrink:0}button,a,input{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--focus)}[hidden]{display:none!important}.skip{position:fixed;top:-70px;background:var(--ink);color:white;padding:12px;z-index:60}.skip:focus{top:0}.preview{height:34px;background:var(--primary);color:white;font-size:12px;display:flex;align-items:center;justify-content:center;gap:18px}.preview span{opacity:.9}.app{display:grid;grid-template-columns:226px minmax(0,1fr);min-height:calc(100dvh - 34px)}.sidebar{background:var(--side);border-right:1px solid var(--line);padding:30px 18px 16px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;font-weight:750;font-size:16px;line-height:1.1;margin:0 9px 32px}.brand-mark{width:35px;height:42px;border:1px solid var(--ink);display:grid;place-items:center;font-size:14px;letter-spacing:-1px}.brand small{display:block;margin-top:9px;font-size:10px;font-weight:400;color:var(--muted);line-height:1.3}.nav-label{color:var(--muted);font-size:11px;margin:21px 12px 9px}.nav-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;font-size:13px;min-height:42px;margin-bottom:3px}.nav-item img{width:19px;height:19px;opacity:.78}.nav-item:hover{background:var(--selected)}.nav-item.active{background:var(--selected);font-weight:650;color:var(--primary)}.sidebar-bottom{margin-top:auto;padding-top:28px}.owner{display:flex;align-items:center;gap:10px;margin:20px 10px 0;padding-top:20px;border-top:1px solid var(--line)}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--yellow);font-weight:650;font-size:14px}.owner strong{display:block;font-size:13px}.owner small{color:var(--muted);font-size:11px}.workspace{min-width:0}.topbar{height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 38px;border-bottom:1px solid var(--line);background:var(--surface);gap:12px}.breadcrumb{font-size:12px;color:var(--muted)}.topbar-right{display:flex;align-items:center;gap:18px}.date{color:var(--muted);font-size:12px}.small-avatar{width:30px;height:30px;font-size:12px}.icon-button{background:transparent;border:0;border-radius:8px;display:flex;align-items:center;justify-content:center;width:40px;height:40px}.icon-button:hover{background:var(--side)}.open-menu,.close-menu{display:none}main{max-width:1380px;margin:0 auto;padding:32px 38px 40px;min-height:calc(100dvh - 164px)}h1,h2,h3,p{margin:0}h1{font-size:32px;letter-spacing:-.03em;line-height:1.2;font-weight:650;text-wrap:balance}h2{font-size:18px;letter-spacing:-.01em;font-weight:650}h3{font-size:17px;font-weight:650}p{text-wrap:pretty}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.intro p{color:var(--muted);margin-top:8px;font-size:13px;max-width:65ch}.search{display:flex;align-items:center;gap:9px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:0 12px;height:42px;min-width:230px}.search img{width:17px;height:17px;opacity:.75}.search input{width:100%;background:none;border:0;padding:8px 0;color:var(--ink);font-size:12px}.search input::placeholder{color:var(--muted)}.overview{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:32px;padding:23px 26px;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin-bottom:28px}.overview .eyeline{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;margin-bottom:14px;color:var(--primary)}.overview .eyeline img{width:17px;height:17px}.overview h2{font-size:20px}.overview p{margin-top:7px;max-width:65ch;color:var(--muted);font-size:12px;line-height:1.65}.text-link{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--primary);margin-top:15px}.text-link img{width:15px;height:15px}.source-list{padding-left:26px;border-left:1px solid var(--line);display:flex;flex-direction:column;justify-content:center;gap:13px}.source-row{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px}.source-row span{color:var(--muted);font-size:11px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:22px 0 13px;gap:12px}.section-heading small{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.section-heading small img{width:14px;height:14px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.category{padding:21px 22px;border-radius:12px;position:relative;min-height:168px;display:flex;flex-direction:column;transition:transform .18s ease-out,filter .18s ease-out}.category:hover{transform:translateY(-3px);filter:brightness(.98)}.category-top{display:flex;align-items:center;gap:11px;margin-bottom:12px}.category-top img{width:24px;height:24px}.category p{font-size:12px;line-height:1.65;max-width:29ch;color:oklch(.39 .018 230);padding-right:12px}.category-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:16px;font-size:11px;color:oklch(.43 .018 230)}.category-bottom img{width:18px;height:18px}.peach{background:var(--peach)}.blue{background:var(--blue)}.rose{background:var(--rose)}.yellow{background:var(--yellow)}.green{background:var(--green)}.lilac{background:var(--lilac)}.personal-grid .category{min-height:142px}.personal-grid .category p{font-size:12px}.decision-area{margin-top:28px;border-top:1px solid var(--line);padding-top:22px;display:flex;justify-content:space-between;align-items:center;gap:30px}.decision-area p{font-size:12px;max-width:60ch;color:var(--muted);margin-top:6px}.decision-flow{display:flex;align-items:center;gap:12px;white-space:nowrap;color:var(--primary);font-size:12px}.decision-flow img{width:14px;height:14px}footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:10px;padding:18px 38px}.back{display:inline-flex;gap:7px;align-items:center;font-size:12px;color:var(--muted);margin-bottom:20px}.back img{width:16px;height:16px}.section-title-icon{display:flex;align-items:center;gap:15px}.section-title-icon>.title-icon{padding:14px;border-radius:12px}.title-icon img{width:28px;height:28px}.tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin:26px 0 26px;overflow:auto}.tab{background:none;border:0;border-bottom:2px solid transparent;white-space:nowrap;padding:0 0 12px;color:var(--muted);font-size:13px}.tab.active{border-color:var(--primary);color:var(--primary);font-weight:600}.tab-panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:42px 24px;text-align:center;min-height:250px}.empty-icon{width:48px;height:48px;border-radius:12px;background:var(--side);display:grid;place-items:center;margin:0 auto 16px}.empty-icon img{width:25px;height:25px}.tab-panel p{font-size:13px;color:var(--muted);max-width:52ch;margin:9px auto 0;line-height:1.7}.label{display:inline-block;font-size:11px;color:var(--primary);background:var(--selected);padding:5px 9px;border-radius:5px}.empty-caption{margin-top:18px!important;font-size:11px!important}.detail-lower{display:grid;grid-template-columns:1.4fr 1fr;gap:40px;margin-top:30px}.detail-lower h2{margin-bottom:15px}.decision-list{list-style:none;margin:0;padding:0}.decision-list li{display:flex;align-items:flex-start;gap:10px;margin:13px 0;font-size:13px}.decision-list li img{width:16px;height:16px;margin-top:2px}.source-note{color:var(--muted);font-size:12px;line-height:1.8;max-width:60ch}.source-note strong{color:var(--ink)}.integration-list{margin-top:24px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:0 24px}.integration{display:grid;grid-template-columns:48px 1fr auto;gap:18px;padding:25px 0;align-items:center}.integration+.integration{border-top:1px solid var(--line)}.integration>img{width:30px;height:30px}.integration h2{font-size:16px}.integration p{font-size:12px;color:var(--muted);max-width:65ch;margin-top:5px}.no-results{padding:28px 0;color:var(--muted)}
@media(min-width:1600px){main{padding-top:45px}.category{min-height:190px}.personal-grid .category{min-height:160px}}
@media(max-width:1150px){.app{grid-template-columns:196px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.topbar{padding:0 26px}main{padding:27px 26px}.overview{grid-template-columns:1fr 230px;gap:20px}.source-list{padding-left:20px}.category{padding:18px 17px}.decision-area{align-items:flex-start}.decision-flow{font-size:11px;gap:7px}.search{min-width:190px}.category h3{font-size:16px}}
@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{visibility:hidden;position:fixed;top:0;bottom:0;width:250px;z-index:40;transform:translateX(-100%);transition:transform .2s ease-out;overflow:auto}.sidebar.open{visibility:visible;transform:translateX(0)}.close-menu{display:flex;position:absolute;top:16px;right:10px}.brand{margin-top:20px}.open-menu{display:flex}.scrim{position:fixed;inset:0;background:oklch(.15 .01 230 / .4);border:0;z-index:30}.topbar{height:66px}.breadcrumb{margin-right:auto}.date{display:none}.decision-area{flex-direction:column;gap:15px}.topbar-right{gap:10px}}
@media(max-width:600px){.preview{height:30px;font-size:10px;gap:10px}.preview span{font-size:9px}.topbar{padding:0 16px}.breadcrumb{font-size:11px}main{padding:24px 18px 28px}.intro{display:block;margin-bottom:20px}h1{font-size:27px}.intro p{font-size:12px;max-width:38ch}.search{margin-top:18px;width:100%;height:42px}.overview{display:block;padding:19px;margin-bottom:24px}.overview h2{font-size:18px}.source-list{border-left:0;border-top:1px solid var(--line);padding:15px 0 0;margin-top:18px;gap:10px}.overview p{font-size:12px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.category{padding:17px 14px;min-height:181px}.category-top{display:block;margin-bottom:9px}.category-top img{width:23px;height:23px;margin-bottom:9px}.category h3{font-size:15px}.category p{font-size:11px;padding-right:0}.category-bottom{font-size:10px;padding-top:12px}.personal-grid .category{min-height:173px}.personal-grid .category p{font-size:11px}.section-heading h2{font-size:16px}.section-heading small{font-size:10px}.decision-area h2{font-size:16px}.decision-flow{font-size:11px;gap:9px}footer{padding:16px 18px;font-size:9px}footer span:last-child{display:none}.detail-lower{grid-template-columns:1fr;gap:25px}.tab-panel{padding:32px 18px}.tabs{gap:22px}.section-title-icon h1{font-size:25px}.title-icon{padding:11px!important}.title-icon img{width:24px;height:24px}.integration{grid-template-columns:30px 1fr;gap:12px;padding:22px 0}.integration .label{grid-column:2;justify-self:start}.integration-list{padding:0 18px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}.category:hover{transform:none}}

/* Предметные изображения по референсу пользователя. */
.category{min-height:205px;overflow:hidden;padding-right:42%;isolation:isolate}
.category-top,.category>p,.category-bottom{position:relative;z-index:1}
.category-top{gap:9px;white-space:nowrap}
.category>p{padding-right:0;max-width:26ch}
.category .category-art{position:absolute;z-index:0;width:47%;height:76%;right:5px;bottom:10px;object-fit:contain;pointer-events:none}
.category-bottom{font-size:10px;line-height:1.5;gap:8px}
.category-bottom>span{max-width:23ch}
.category-bottom>img{position:absolute;right:calc(-68% - 8px);bottom:0}
.personal-grid .category{min-height:185px}
.category[href="#important"] .category-art{width:36%;right:15px}
.category[href="#english"] .category-art{width:43%;right:6px}
@media(min-width:1600px){.category{min-height:230px}.personal-grid .category{min-height:205px}}
@media(min-width:901px) and (max-width:1250px){.category{min-height:245px;padding-right:18px;padding-bottom:110px}.category>p{max-width:32ch}.category .category-art{width:48%;height:44%;right:4px;bottom:4px}.category-bottom{position:absolute;left:18px;bottom:20px;width:45%}.category-bottom>img{display:none}.personal-grid .category{min-height:230px}}
@media(min-width:601px) and (max-width:900px){.category{min-height:235px;padding-right:18px;padding-bottom:100px}.category .category-art{width:48%;height:43%;bottom:4px}.category-bottom{position:absolute;left:18px;bottom:20px;width:44%}.category-bottom>img{display:none}.personal-grid .category{min-height:210px}}
@media(max-width:600px){.category,.personal-grid .category{min-height:244px;padding:17px 14px 112px}.category-top{display:flex;gap:8px;white-space:normal}.category-top img{width:20px;height:20px;margin:0}.category>p{font-size:11px}.category .category-art{height:100px;width:73%;right:0;bottom:7px}.category[href="#important"] .category-art{width:56%;right:7px}.category[href="#english"] .category-art{width:66%;right:1px}.category-bottom{position:absolute;left:14px;bottom:17px;width:30%;font-size:9px;line-height:1.5}.category-bottom>img{display:none}.personal-grid .category>p{font-size:11px}}

@media(max-width:600px){.category-bottom{display:none}.category .category-art{height:120px;width:90%;right:5%;bottom:6px}.category[href="#important"] .category-art{width:75%;right:12.5%}.category[href="#english"] .category-art{width:84%;right:8%}}

.title-icon .detail-art{width:50px;height:50px;object-fit:contain}
@media(max-width:600px){.title-icon .detail-art{width:42px;height:42px}}

/* Рабочие записи: одна форма и понятные состояния хранения. */
.records-panel{text-align:left;padding:24px;min-width:0}
.records-panel>p{margin-left:0;max-width:none}
.record-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;border-bottom:1px solid var(--line);padding-bottom:20px}
.record-stats>div{display:flex;flex-direction:column;gap:4px}
.record-stats strong{font-size:28px;font-weight:650;line-height:1.2}
.record-stats span,.storage-label,.stats-note{color:var(--muted);font-size:11px}
.record-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:22px}
.record-feedback{font-size:12px!important;color:var(--primary)!important;min-height:20px}
.record-editor{margin:12px 0 20px;padding:16px 18px;background:var(--side);border:1px solid var(--line);border-radius:8px}
.record-editor summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--primary)}
.record-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}
.record-form label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:550;min-width:0}
.record-form input,.record-form textarea,.record-form select{border:1px solid var(--line);border-radius:6px;padding:10px 12px;font:inherit;font-weight:400;background:var(--surface);color:var(--ink);width:100%;min-width:0}
.record-form textarea{resize:vertical}.record-form .wide{grid-column:1/-1}
.form-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.primary-button,.secondary-button{border:1px solid var(--primary);border-radius:6px;padding:10px 15px;font-size:12px;cursor:pointer}
.primary-button{background:var(--primary);color:white}.secondary-button{background:var(--surface);color:var(--primary)}
button:disabled{opacity:.55;cursor:wait}.form-error{color:oklch(.45 .15 25);font-size:12px}
.record-list{display:flex;flex-direction:column;gap:14px}
.record{border:1px solid var(--line);border-radius:8px;padding:18px;min-width:0}
.record-heading{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}
.record h3{font-size:15px;overflow-wrap:anywhere}
.record-status{color:var(--muted);font-size:10px;white-space:nowrap;padding:4px 7px;background:var(--side);border-radius:4px}
.record p.record-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 0;max-width:none;font-size:12px;text-align:left}
.record-meta{display:flex;flex-wrap:wrap;gap:12px;color:var(--muted);font-size:11px;margin-top:12px;overflow-wrap:anywhere}
.record-meta .overdue{color:oklch(.45 .15 25)}
.record-actions{display:flex;flex-wrap:wrap;gap:18px;margin-top:16px}
.record-actions button,.delete-confirm button{border:0;background:transparent;padding:5px 0;font-size:11px;color:var(--primary);cursor:pointer}
.record-actions [data-action="remove"],.delete-confirm [data-action="confirm-remove"]{color:oklch(.45 .15 25)}
.delete-confirm{font-size:12px;margin-top:10px;border-top:1px solid var(--line);padding-top:10px;line-height:1.8}
.delete-confirm button{margin-left:12px}
@media(max-width:600px){.records-panel{padding:18px 14px}.record-form{grid-template-columns:1fr}.record-toolbar{align-items:flex-start;flex-direction:column;gap:5px}.record-editor{padding:14px 12px}.record{padding:14px}.record-stats{gap:8px}.record-stats strong{font-size:24px}.record-stats span{font-size:10px}.record-heading{flex-direction:column;gap:8px}}

[hidden]{display:none!important}
.auth-screen{min-height:85vh;display:grid;place-items:center;padding:24px}
.auth-card{width:min(100%,430px);padding:32px;border:1px solid var(--border,#ddd);border-radius:24px;background:white;box-shadow:0 12px 40px #00000008}
.auth-card h1{margin-top:24px;font-size:30px}
.auth-card .record-form{grid-template-columns:1fr}
.auth-card input{width:100%}
.invite-result input{width:100%;padding:12px;border:1px solid #bbb;border-radius:8px}
.record label{display:inline-grid;gap:6px;margin-right:12px}
.record select{padding:8px;border:1px solid #bbb;border-radius:8px}
.sidebar-bottom>button{margin:12px 0;width:100%}

.source-control{margin:24px 0;padding:24px;border:1px solid var(--border,#ddd);border-radius:20px;background:white}
.source-control>[role=alert]{color:#a52b24}
.source-control .text-link{display:inline-flex;margin:16px 0}
.stock-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:22px 0}
.stock-filters label{display:grid;gap:6px;flex:1;min-width:170px}
.stock-filters input,.stock-filters select{padding:11px;border:1px solid #c7cbd0;border-radius:8px;width:100%;background:white}
.stock-table-scroll{overflow:auto;max-width:100%}
.stock-table{border-collapse:collapse;width:100%;font-size:14px}
.stock-table th,.stock-table td{padding:12px;text-align:left;border-bottom:1px solid #e6e8eb;white-space:nowrap}
.stock-table th{font-weight:600;background:#f6f7f8}
.stock-table td:first-child{white-space:normal;min-width:210px}
.stock-table small{display:block;color:#646970;margin-top:4px}
@media(max-width:600px){.source-control{padding:16px}.stock-filters{display:grid}.stock-filters label{min-width:0}}
