/* Materials, community and profile share the Русовед visual language. */
.community { --community-purple: var(--purple, #7041c6); --community-ink: var(--ink, #241b39); --community-muted: var(--muted, #786e89); --community-line: var(--line, #e7e0ed); }
.community [hidden] { display: none !important; }
.community .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.community-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.community-header > div { max-width: 650px; }
.community-header > .button { flex-shrink: 0; }
.community .back-link { display: inline-flex; align-items: center; gap: 9px; color: var(--community-muted); font-size: 14px; font-weight: 700; text-decoration: none; margin: 0 0 24px; }
.community .back-link:hover { color: var(--community-purple); }
.community .text-link { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; color: var(--community-purple); text-decoration: none; font-weight: 800; font-size: 14px; }
.community .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.community .text-link .icon, .community .back-link .icon { width: 18px; height: 18px; }
.community-notice { display: flex; align-items: center; gap: 12px; padding: 17px 20px; margin-bottom: 24px; border: 1px solid #d2e5d8; border-radius: 15px; background: #eff8f1; color: #34634a; font-size: 14px; line-height: 1.6; }
.community-notice .icon { flex-shrink: 0; }
.community-notice a { color: inherit; font-weight: 800; text-underline-offset: 3px; }
.community .library-tools { padding: 22px; margin-bottom: 32px; }
.community-search { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 19px; border: 1px solid var(--community-line); border-radius: 14px; background: #fff; }
.community-search:focus-within { outline: 3px solid #e4d9f6; border-color: var(--community-purple); }
.community-search .search-symbol { display: flex; color: #9a8baa; }
.community .community-search input[type="search"] { min-width: 0; flex: 1; color: var(--community-ink); font: inherit; font-size: 15px; padding: 10px 0; border: 0; outline: none; background: transparent; }
.community .community-search input[type="search"]::placeholder { color: #8c8297; }
.community-search .button { min-height: 44px; padding: 10px 23px; }
.material-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filter-button { font: inherit; font-size: 13px; font-weight: 700; padding: 10px 16px; min-height: 40px; cursor: pointer; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--community-muted); transition: color .18s, background .18s; }
.filter-button:hover { background: #f5f0fb; color: var(--community-purple); }
.filter-button.is-active { background: #ede5f8; border-color: #e4d7f6; color: #6132ae; }
.library-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.community .library-heading h2, .community .section-heading h2 { font-family: inherit; font-size: 19px; line-height: 1.4; font-weight: 800; margin: 0; }
.library-heading h2 { overflow-wrap: anywhere; }
.library-count { color: var(--community-muted); font-size: 13px; white-space: nowrap; }
.community .search-reset { margin: -7px 0 21px; }
.material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.community .material-card { display: flex; flex-direction: column; min-width: 0; padding: 24px; text-decoration: none; color: var(--community-ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.community .material-card:hover { border-color: #ccbae8; box-shadow: 0 14px 30px #3e1b7010; transform: translateY(-3px); }
.material-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.material-type-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; height: 46px; width: 46px; color: #6b45a7; background: #ede7f9; border-radius: 13px; }
.material-type-icon .icon { width: 25px; height: 25px; }
.material-type-icon.type-presentations { background: #fff0dd; color: #b47728; }
.material-type-icon.type-cards { background: #eaf3e6; color: #6f8752; }
.material-type-icon.type-video { background: #f8e8ef; color: #b1678a; }
.material-type-label { font-size: 12px; font-weight: 700; color: var(--community-muted); }
.new-badge { margin-left: auto; font-size: 10px; font-weight: 800; color: #6d459f; background: #f2ebfc; padding: 4px 8px; border-radius: 6px; }
.community .material-card h3, .community .publication-card h3 { margin: 0 0 11px; font-family: inherit; font-size: 18px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.material-excerpt { margin: 0 0 20px; color: var(--community-muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.material-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 19px; border-top: 1px solid #f0ebf5; }
.material-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; color: var(--community-muted); font-size: 12px; }
.material-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.material-meta .icon { width: 16px; height: 16px; }
.card-open { display: flex; color: var(--community-purple); }
.card-open .icon { width: 19px; height: 19px; }
.community .library-empty { grid-column: 1 / -1; padding: 54px 24px; }
.community .empty-state h3 { font-family: inherit; font-size: 21px; font-weight: 800; margin: 18px 0 10px; }
.community .empty-state p { max-width: 460px; margin: 0 auto 23px; line-height: 1.7; font-size: 14px; color: var(--community-muted); }
.empty-symbol { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; background: #eee6f9; color: var(--community-purple); }
.empty-symbol .icon { width: 30px; height: 30px; }
.community-invitation { display: flex; align-items: center; gap: 22px; margin-top: 36px; padding: 26px 30px; background: #f0eaf8; border: 1px solid #e5dbf1; border-radius: 20px; }
.invitation-symbol { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; background: #e4d7f3; color: #7344ab; }
.invitation-symbol .icon { width: 27px; height: 27px; }
.community .community-invitation h2 { font-family: inherit; font-size: 17px; font-weight: 800; margin: 0 0 5px; }
.community-invitation p { color: var(--community-muted); font-size: 13px; margin: 0; line-height: 1.6; }
.community-invitation .text-link { margin-left: auto; white-space: nowrap; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 28px; }
.community .material-detail-card { padding: 36px; }
.detail-kicker { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; }
.detail-kicker .eyebrow { margin: 0; }
.community .detail-title { font-family: 'Lora', Georgia, serif; font-size: clamp(27px, 3vw, 37px); font-weight: 500; line-height: 1.27; letter-spacing: -.6px; margin: 0 0 15px; overflow-wrap: anywhere; }
.detail-byline { font-size: 13px; color: var(--community-muted); line-height: 1.6; margin: 0 0 26px; }
.material-description { color: #5f566c; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.material-description p { margin: 0 0 16px; }
.detail-meta { padding-top: 22px; margin-top: 25px; border-top: 1px solid var(--community-line); font-size: 13px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 25px; }
.detail-actions form { margin: 0; }
.community .like-button.is-liked { background: #f6e8f0; border-color: #e8c7d9; color: #a14d7b; }
.like-button.is-liked .icon { fill: currentColor; }
.community .community-note { padding: 29px; background: #f1eaf9; }
.note-symbol { display: inline-flex; align-items: center; justify-content: center; color: var(--community-purple); height: 50px; width: 50px; margin-bottom: 21px; background: #e7daf5; border-radius: 15px; }
.note-symbol .icon { height: 28px; width: 28px; }
.community .community-note h2 { font-family: 'Lora', Georgia, serif; font-size: 23px; line-height: 1.35; font-weight: 500; margin: 0 0 16px; }
.community-note > p { font-size: 14px; line-height: 1.75; margin: 0 0 23px; color: var(--community-muted); }
.community .comments-panel { margin-top: 28px; padding: 32px 36px; max-width: 812px; }
.comments-panel .section-heading { justify-content: flex-start; gap: 10px; }
.comment-item { display: flex; align-items: flex-start; gap: 13px; padding: 22px 0; border-top: 1px solid var(--community-line); }
.comment-avatar { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #eee7f9; color: var(--community-purple); font-weight: 800; }
.comment-content { flex: 1; min-width: 0; }
.comment-byline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 15px; align-items: center; font-size: 14px; }
.comment-byline time { color: var(--community-muted); font-size: 12px; }
.comment-text { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.comment-text p { margin: 9px 0 0; }
.comments-empty { color: var(--community-muted); line-height: 1.7; font-size: 14px; max-width: 560px; margin: 0 0 20px; }
.comment-form { padding-top: 24px; border-top: 1px solid var(--community-line); }
.comment-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 16px; }
.comment-form-footer > .button { flex-shrink: 0; }
.comment-signin { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; border-top: 1px solid var(--community-line); }
.comment-signin p { color: var(--community-muted); font-size: 14px; line-height: 1.6; margin: 0; }
.comment-signin .button { flex-shrink: 0; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 36px; }
.community .upload-panel { padding: 34px; }
.community-form label { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14px; font-weight: 800; margin: 0 0 10px; color: var(--community-ink); }
.community-form input:not([type='hidden']), .community-form select, .community-form textarea { width: 100%; min-width: 0; border: 1px solid #ded5e9; border-radius: 11px; padding: 13px 14px; background: #fdfbff; color: var(--community-ink); font: inherit; font-size: 15px; line-height: 1.5; transition: border-color .18s, box-shadow .18s; }
.community-form input:focus, .community-form select:focus, .community-form textarea:focus { outline: 3px solid #e8def7; border-color: var(--community-purple); background: #fff; }
.community-form textarea { display: block; resize: vertical; min-height: 118px; }
.community-form .form-field { margin-bottom: 25px; }
.community-form .errorlist { list-style: none; padding: 10px 13px; margin: 9px 0; border-radius: 8px; background: #fff0f1; color: #a63d50; font-size: 13px; line-height: 1.5; }
.community-form [aria-invalid='true'] { border-color: #c56878; }
.required-label, .optional-label { font-size: 11px; font-weight: 500; color: var(--community-muted); margin-left: auto; }
.field-help { color: var(--community-muted); line-height: 1.6; font-size: 12px; margin: 9px 0 0; }
.file-field { padding: 21px; border-radius: 14px; border: 1px dashed #cbb9e0; background: #f8f4fc; }
.community-form .file-field input { border: 0; background: transparent; padding: 9px 0 2px; font-size: 12px; }
.community-form .file-field input::file-selector-button { background: #fff; color: var(--community-purple); border: 1px solid #ddd0ef; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; margin-right: 12px; padding: 10px 14px; cursor: pointer; }
.file-field label .icon { height: 19px; width: 19px; }
.upload-submit { padding-top: 7px; }
.upload-submit .field-help { margin: 0 0 16px; }
.upload-submit > .button { width: 100%; }
.community .upload-aside { background: transparent; padding: 15px 8px; }
.upload-steps { list-style: none; padding: 0; margin: 29px 0; }
.upload-steps li { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 23px; }
.upload-steps li:last-child { padding-bottom: 0; }
.upload-steps li > span { display: flex; flex-shrink: 0; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: #eee6f7; color: var(--community-purple); font-weight: 800; font-size: 12px; }
.upload-steps strong { display: block; font-size: 14px; margin: 4px 0 6px; }
.upload-steps p { font-size: 13px; line-height: 1.65; color: var(--community-muted); margin: 0; }
.profile-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.community .user-panel { padding: 30px 24px 10px; text-align: center; }
.user-avatar { display: flex; align-items: center; justify-content: center; height: 86px; width: 86px; margin: 0 auto 19px; border-radius: 28px; background: linear-gradient(145deg, #9567d1, #6336a4); box-shadow: 0 9px 23px #7041c629; color: #fff; font-family: 'Lora', Georgia, serif; font-size: 38px; }
.community .user-panel h2 { font-family: inherit; font-size: 21px; line-height: 1.4; font-weight: 800; margin: 0 0 7px; overflow-wrap: anywhere; }
.user-role { margin: 0; color: var(--community-muted); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 22px 0; margin: 23px 0 9px; border-top: 1px solid var(--community-line); border-bottom: 1px solid var(--community-line); }
.profile-stats > div { display: flex; flex-direction: column-reverse; gap: 3px; }
.profile-stats > div + div { border-left: 1px solid var(--community-line); }
.profile-stats dt { font-size: 11px; color: var(--community-muted); }
.profile-stats dd { margin: 0; color: var(--community-purple); font-size: 26px; font-weight: 800; }
.profile-menu-item { display: flex; width: 100%; justify-content: flex-start; gap: 9px; padding: 16px 0; background: transparent; border: none; text-decoration: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--community-muted); cursor: pointer; text-align: left; }
.profile-menu-item:hover { color: var(--community-purple); }
.profile-menu-item .icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-menu-item .icon:last-child:not(:first-child) { margin-left: auto; }
.logout-form { margin: 0; }
.logout-button { color: #a6596c; }
.profile-note { padding: 0 15px; margin: 21px 0 0; color: var(--community-muted); font-size: 12px; text-align: center; line-height: 1.7; }
.publications-heading { justify-content: flex-start; gap: 12px; min-height: 30px; }
.publication-list { display: grid; gap: 16px; }
.community .publication-card { padding: 25px; }
.publication-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.publication-status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; padding: 5px 8px; border-radius: 7px; }
.publication-status .icon { width: 12px; height: 12px; }
.status-approved { background: #edf5e9; color: #597744; }
.status-pending { background: #fbf1de; color: #94702f; }
.publication-card h3 a { color: inherit; text-decoration: none; }
.publication-card h3 a:hover { color: var(--community-purple); }
.publication-bottom { display: flex; justify-content: space-between; gap: 15px; color: var(--community-muted); font-size: 12px; }
.community .profile-empty { padding: 50px 27px; }
.community .signin-layout { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin: 15px auto 30px; max-width: 1020px; }
.signin-story { position: relative; overflow: hidden; padding: 44px 42px 47px; background: #ece2f9; }
.signin-story .eyebrow { font-size: 10px; letter-spacing: 2px; color: #7c5ba1; }
.signin-emblem { position: relative; width: 200px; height: 190px; margin: 32px 0 18px; }
.signin-emblem > .icon { position: absolute; top: 22px; left: 2px; width: 180px; height: 155px; stroke-width: .75; fill: #fff9e9; color: #a487c3; }
.signin-emblem > span { position: absolute; top: 41px; left: 70px; color: #6e42a4; font-family: 'Lora', Georgia, serif; font-size: 60px; }
.signin-emblem img { width: 220px; height: 200px; object-fit: contain; filter: drop-shadow(0 12px 15px #663a8320); }
.community .signin-story h1 { position: relative; z-index: 1; font-family: 'Lora', Georgia, serif; font-size: clamp(27px, 3vw, 36px); font-weight: 500; line-height: 1.25; color: #422662; margin: 0 0 19px; letter-spacing: -.6px; }
.signin-story > p:not(.eyebrow) { position: relative; z-index: 1; color: #7b668f; font-size: 14px; line-height: 1.7; margin: 0; }
.signin-story-flourish { position: absolute; right: -30px; bottom: -100px; color: #e1d1f0; font-size: 290px; line-height: 1; transform: rotate(-12deg); }
.signin-form-panel { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 48px; }
.signin-user-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 18px; color: var(--community-purple); background: #f0e9f8; margin-bottom: 25px; }
.signin-user-icon .icon { height: 27px; width: 27px; }
.community .signin-form-panel h2 { font-family: 'Lora', Georgia, serif; font-size: 28px; font-weight: 500; line-height: 1.3; letter-spacing: -.4px; margin: 0 0 15px; }
.signin-form-panel > p { margin: 0 0 28px; color: var(--community-muted); font-size: 14px; line-height: 1.8; }
.signin-form-panel form { width: 100%; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 15px 18px; border-radius: 12px; border: 1px solid #ded4e8; background: #fff; color: #443451; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.google-button:hover { border-color: #b397d4; box-shadow: 0 4px 15px #47285d0a; }
.google-button svg { flex-shrink: 0; }
.signin-divider { display: flex; align-items: center; gap: 14px; width: 100%; margin: 30px 0 21px; color: var(--community-muted); font-size: 11px; }
.signin-divider::before, .signin-divider::after { content: ''; height: 1px; flex: 1; background: var(--community-line); }
.signin-form-panel > .text-link { align-self: center; }
@media (max-width: 1050px) {
    .community-header { align-items: flex-start; }
    .community-header .page-title { max-width: 620px; }
    .community-header > .button { margin-top: 30px; }
    .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 25px; }
    .detail-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
    .community .material-detail-card { padding: 28px; }
    .community .comments-panel { max-width: none; }
    .signin-form-panel { padding: 36px; }
}
@media (max-width: 760px) {
    .community-header { display: block; }
    .community-header > .button { margin-top: 20px; }
    .community .library-tools { padding: 15px; margin-bottom: 26px; }
    .community-search { gap: 10px; padding-left: 13px; }
    .community .community-search input[type="search"] { font-size: 14px; }
    .material-filters { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 3px; margin-top: 14px; }
    .filter-button { white-space: nowrap; padding: 9px 13px; }
    .community-invitation { flex-wrap: wrap; padding: 23px; gap: 16px; }
    .community-invitation > div { flex: 1; min-width: 200px; }
    .community-invitation .text-link { margin-left: 70px; }
    .detail-layout, .upload-layout { grid-template-columns: 1fr; }
    .detail-aside { display: none; }
    .community .comments-panel { padding: 25px; }
    .community .upload-aside { padding: 15px 20px; }
    .profile-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; }
    .community .user-panel { padding-left: 18px; padding-right: 18px; }
    .publication-card .publication-top { align-items: flex-start; }
    .signin-story { padding: 34px 29px; }
    .signin-form-panel { padding: 32px 26px; }
    .signin-divider { gap: 7px; }
}
@media (max-width: 590px) {
    .material-grid { grid-template-columns: 1fr; gap: 14px; }
    .community .material-card { padding: 22px; }
    .material-card-top { margin-bottom: 18px; }
    .material-excerpt { margin-bottom: 17px; }
    .community .library-heading h2, .community .section-heading h2 { font-size: 17px; }
    .library-heading { align-items: flex-start; gap: 12px; }
    .library-count { font-size: 11px; padding-top: 3px; }
    .community-search .button { padding: 10px 14px; font-size: 13px; }
    .community .community-search input[type="search"] { font-size: 13px; }
    .community-search .search-symbol .icon { width: 18px; height: 18px; }
    .community-invitation { padding: 22px; }
    .community-invitation .text-link { margin-left: 0; }
    .invitation-symbol { width: 44px; height: 44px; }
    .community .community-invitation h2 { font-size: 16px; }
    .community .community-invitation > div { min-width: 180px; }
    .community .material-detail-card, .community .comments-panel, .community .upload-panel { padding: 23px; }
    .community .detail-title { font-size: 27px; }
    .detail-actions { align-items: stretch; }
    .detail-actions > .button, .detail-actions > form { width: 100%; }
    .detail-actions form .button { width: 100%; }
    .comment-form-footer { display: block; }
    .comment-form-footer > .button { width: 100%; margin-top: 15px; }
    .comment-signin { display: block; }
    .comment-signin .button { width: 100%; margin-top: 15px; }
    .comment-byline { display: block; }
    .comment-byline time { display: block; margin-top: 3px; }
    .comment-avatar { height: 32px; width: 32px; font-size: 13px; }
    .comment-item { gap: 10px; }
    .community-form input:not([type='hidden']), .community-form select, .community-form textarea { font-size: 16px; }
    .file-field { padding: 16px; }
    .community-form .file-field input { font-size: 12px; }
    .profile-layout { grid-template-columns: 1fr; gap: 30px; }
    .profile-note { display: none; }
    .community .user-panel { padding: 25px 22px 5px; }
    .user-avatar { width: 72px; height: 72px; border-radius: 23px; font-size: 32px; }
    .profile-stats { margin-top: 20px; padding: 17px 0; }
    .community .publication-card { padding: 22px; }
    .community .signin-layout { grid-template-columns: 1fr; margin-top: 0; }
    .signin-story { padding: 30px 26px; }
    .signin-story .eyebrow { max-width: calc(100% - 80px); font-size: 9px; margin-top: 0; }
    .signin-emblem { position: absolute; right: 20px; top: 20px; width: 78px; height: 78px; margin: 0; opacity: 1; transform: none; }
    .signin-emblem > .icon { width: 145px; height: 125px; }
    .signin-emblem > span { font-size: 43px; top: 40px; left: 60px; }
    .signin-emblem img { width: 78px; height: 78px; }
    .community .signin-story h1 { font-size: 28px; max-width: 260px; margin-top: 56px; }
    .signin-story > p:not(.eyebrow) { font-size: 12px; }
    .signin-story-flourish { font-size: 200px; right: -10px; bottom: -85px; }
    .signin-form-panel { padding: 30px 26px 34px; }
    .signin-user-icon { display: none; }
    .community .signin-form-panel h2 { font-size: 26px; }
    .signin-form-panel > p { margin-bottom: 23px; }
    .community .empty-state h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .community *, .community *::before, .community *::after { transition: none !important; }
    .community .material-card:hover { transform: none; }
}
