:root {
    --ss-bg: #f6f5f2;
    --ss-panel: #ffffff;
    --ss-line: #e6e4de;
    --ss-text: #171717;
    --ss-mute: #6b6b6b;
    --ss-pink: #e41f07;
    --ss-green: #1faa5a;
    --ss-vk: #0077ff;
    --ss-ya: #fc0;
}

html, body.ss {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--ss-bg);
    color: var(--ss-text);
    font-family: "Golos Text", system-ui, sans-serif;
}

body.ss {
    background-image:
        radial-gradient(900px 420px at 90% -8%, rgba(228, 31, 7, 0.08), transparent 55%),
        linear-gradient(180deg, #fff 0%, #f6f5f2 36%);
}

a { color: inherit; }

.ss-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 18px 32px;
    border-bottom: 1px solid var(--ss-line);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    z-index: 5;
}

.ss-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
    min-width: 0;
}

.ss-mark {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}

.ss-brand img {
    display: block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ss-brand__name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-brand__name:hover { color: #111; }

.ss-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 15px;
}

.ss-links a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    text-decoration: none;
    color: #444;
    box-sizing: border-box;
}

.ss-links a:hover { color: #111; }

.ss-staff {
    background: var(--ss-pink);
    color: #fff !important;
    font-weight: 500;
    padding: 0 14px;
    border-radius: 4px;
    line-height: 1;
}

.ss-staff:hover {
    color: #fff !important;
    filter: brightness(1.08);
}

.ss-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px 72px;
}

.ss-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: -0.03em;
}

.ss-lead, .ss-meta, .ss-empty, .ss-note, .ss-copy, .ss-sum {
    color: var(--ss-mute);
}

.ss-tools {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 0 0 22px;
}

.ss-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    min-width: 0;
}

.ss-view {
    display: inline-flex;
    flex-shrink: 0;
    border: 1px solid var(--ss-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.ss-view button {
    width: 40px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #6b6b6b;
    cursor: pointer;
}

.ss-view button.is-on {
    background: var(--ss-text);
    color: #fff;
}

.ss-tab {
    border: 1px solid var(--ss-line);
    background: #fff;
    color: #444;
    border-radius: 999px;
    padding: 8px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ss-tab.is-on {
    background: var(--ss-text);
    color: #fff;
    border-color: var(--ss-text);
}

.ss-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ss-card {
    background: var(--ss-panel);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ss-line);
    box-shadow: 0 10px 28px rgba(23, 23, 23, 0.06);
}

.ss-card__media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eceae4;
}

.ss-card__media img,
.ss-detail__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ss-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: var(--ss-pink);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 10px;
}

.ss-card__body { padding: 16px 16px 18px; }

.ss-card__body h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
}

.ss-card__body h2 a { text-decoration: none; }

.ss-card__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    font-size: 14px;
}

.ss-card__row a {
    color: var(--ss-green);
    text-decoration: none;
    font-weight: 700;
    flex-shrink: 0;
}

.ss-who {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ss-who--teacher {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.ss-who--list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
}

.ss-face {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #eceae4;
    flex-shrink: 0;
}

.ss-who--teacher .ss-face {
    width: 32px;
    height: 32px;
}

.ss-faces {
    display: flex;
    align-items: center;
}

.ss-faces .ss-face {
    border: 2px solid #fff;
    margin-left: -8px;
    box-shadow: 0 0 0 1px var(--ss-line);
}

.ss-faces .ss-face:first-child { margin-left: 0; }

body.ss-view-list .ss-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.ss-view-list .ss-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

body.ss-view-list .ss-card__media {
    aspect-ratio: auto;
    width: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: transparent;
}

body.ss-view-list .ss-badge {
    position: static;
    margin: 0 0 0 12px;
    font-size: 11px;
    padding: 4px 8px;
    white-space: nowrap;
}

body.ss-view-list .ss-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px 18px;
    padding: 10px 16px 10px 12px;
}

body.ss-view-list .ss-card__body h2 {
    flex: 1 1 150px;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ss-view-list .ss-meta {
    flex: 1.2 1 180px;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ss-view-list .ss-who--teacher {
    flex: 0 1 170px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
}

body.ss-view-list .ss-who--teacher span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ss-view-list .ss-who--teacher .ss-face {
    width: 20px;
    height: 20px;
}

body.ss-view-list .ss-face {
    width: 18px;
    height: 18px;
}

body.ss-view-list .ss-faces .ss-face {
    margin-left: -5px;
    border-width: 1px;
}

body.ss-view-list .ss-card__row {
    flex: 1.4 1 220px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
}

body.ss-view-list .ss-who__names {
    font-size: 12px;
}

.ss-who__names {
    font-size: 13px;
    color: #444;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-detail {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: start;
}

.ss-detail__visual {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eceae4;
    min-height: 280px;
}

.ss-detail__visual h1 {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 48px;
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.ss-detail__visual .ss-meta {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #fff;
}

.ss-detail__visual:not(:has(img)) {
    min-height: 0;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ss-detail__visual:not(:has(img)) h1,
.ss-detail__visual:not(:has(img)) .ss-meta,
.ss-detail__visual:not(:has(img)) .ss-badge {
    position: static;
    color: #171717;
    text-shadow: none;
}

.ss-detail__visual:not(:has(img)) .ss-badge {
    color: #fff;
}

.ss-detail__panel {
    background: #fff;
    border: 1px solid var(--ss-line);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 10px 28px rgba(23, 23, 23, 0.06);
}

.ss-detail__panel h2 { margin: 0 0 16px; }

.ss-form label {
    display: block;
    font-size: 13px;
    color: var(--ss-mute);
    margin-bottom: 16px;
}

.ss-form textarea {
    width: 100%;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
    color: var(--ss-text);
    border: 1px solid var(--ss-line);
    border-radius: 4px;
    padding: 10px;
    font: inherit;
}

.ss-auth { display: flex; flex-direction: column; gap: 10px; }

.ss-auth.ss-auth--row {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 560px;
}

.ss-auth.ss-auth--row .ss-btn { flex: 1; }

.ss-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ss-green);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    border-radius: 4px;
    padding: 12px 16px;
    cursor: pointer;
    font: inherit;
}

.ss-btn--vk { background: var(--ss-vk); color: #fff; }
.ss-btn--ya { background: var(--ss-ya); color: #111; }

.ss-ok { color: var(--ss-green); font-weight: 700; }
.ss-sum { margin-top: 22px; }

.ss-info {
    margin-top: 40px;
    max-width: 720px;
}

.ss-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.ss-info li {
    padding: 10px 0;
    border-bottom: 1px solid var(--ss-line);
}

.ss-info li span {
    display: inline-block;
    min-width: 110px;
    color: var(--ss-mute);
}

.ss-desc { white-space: pre-wrap; line-height: 1.55; color: #333; }

.ss-foot {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px 40px;
    border-top: 1px solid var(--ss-line);
    color: var(--ss-mute);
    background: #fff;
}

.ss-foot a { color: #171717; }

.gate-legal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    color: #444;
    border-top: 1px solid var(--ss-line);
    font-size: 13px;
    z-index: 20;
}

.gate-legal[hidden] { display: none; }

.gate-legal__ok {
    background: var(--ss-green);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    font-weight: 800;
    cursor: pointer;
}

.ss-copy img {
    display: block;
    opacity: 0.55;
}

@media (max-width: 1100px) {
    .ss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .ss-detail, .ss-foot { display: block; }
    .ss-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }
    .ss-brand__name { max-width: 100%; }
    .ss-links { gap: 12px; }
    .ss-detail__visual { margin-bottom: 20px; }
    .ss-grid { grid-template-columns: 1fr; }
    body.ss-view-list .ss-card,
    body.ss-view-list .ss-card__body {
        align-items: flex-start;
    }
    body.ss-view-list .ss-card__body {
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px 12px 10px;
    }
    body.ss-view-list .ss-card__body h2,
    body.ss-view-list .ss-meta,
    body.ss-view-list .ss-who--teacher,
    body.ss-view-list .ss-card__row {
        flex: 0 0 auto;
        width: 100%;
        white-space: normal;
    }
    body.ss-view-list .ss-card__media {
        align-self: stretch;
        align-items: flex-start;
    }
    body.ss-view-list .ss-badge { margin-top: 14px; }
    body.ss-view-list .ss-card__row { width: 100%; }
}
