/* The channels page (/kanaly/, /en/channels/), on top of blog/blog.css: a form to suggest a channel and the register
   of suggested ones, each with its status, «Чекаю теж» and comments. */
.channels-page {
    --field: rgba(243, 241, 236, .05);
    --field-hover: rgba(243, 241, 236, .08);
    --review: var(--gold);
    --progress: var(--blue);
    --added: #3dd68c;
    --rejected: var(--coral);
    --error: #ff8a76;
}
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.channels-page .field > span,
.channels-page .group-label {
    font: 600 12px / 1.4 var(--display);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
}
.channels-intro {
    max-width: 880px;
}
.channels-intro h1 {
    margin: 18px 0 20px;
    font-weight: 800;
    font-size: clamp(44px, 6.4vw, 92px);
    line-height: .98;
    letter-spacing: -.045em;
}
.channels-intro .lede {
    max-width: 36em;
    margin: 0;
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.5;
    color: var(--muted);
    text-wrap: pretty;
}

/* Suggest a channel */
.suggest {
    margin: 48px 0 0;
    padding: 28px 28px 24px;
    border-radius: 28px;
    background: radial-gradient(ellipse at 100% 0, rgba(244, 174, 26, .13), transparent 55%), var(--card);
    box-shadow: inset 0 0 0 1px var(--line);
}
.suggest h2,
.registry h2 {
    margin: 0 0 18px;
    font-weight: 700;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.15;
    letter-spacing: -.025em;
}
.suggest-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.field .optional {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 13px;
}
.channels-page input[type=text],
.channels-page input[type=search],
.channels-page select,
.channels-page textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--field);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink);
    font: 400 17px / 1.35 var(--display);
    transition: background-color .2s, box-shadow .2s;
}
.channels-page input:hover,
.channels-page select:hover,
.channels-page textarea:hover {
    background-color: var(--field-hover);
}
.channels-page textarea {
    resize: vertical;
    min-height: 96px;
}
.channels-page select {
    appearance: none;
    padding-right: 40px;
    background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a3a7b0' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.channels-page select option {
    background: var(--card);
    color: var(--ink);
}
.channels-page input::placeholder,
.channels-page textarea::placeholder {
    color: var(--faint);
}
.channels-page input:focus-visible,
.channels-page select:focus-visible,
.channels-page textarea:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--gold);
}
.press-button,
.line-button {
    min-height: 50px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    font: 600 16px / 1.2 var(--display);
    cursor: pointer;
    white-space: nowrap;
    transition: transform .25s var(--out), background-color .2s;
}
.press-button:active,
.line-button:active {
    transform: scale(.96);
}
.press-button {
    background: var(--gold);
    color: #161004;
}
.press-button:hover {
    background: #ffbf3a;
}
.line-button {
    background: rgba(243, 241, 236, .06);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink);
}
.line-button:hover {
    background: rgba(243, 241, 236, .11);
}
.press-button[disabled],
.line-button[disabled] {
    opacity: .6;
    cursor: progress;
}
.text-button {
    padding: 8px 2px;
    border: 0;
    background: none;
    color: var(--ink);
    font: 500 15px var(--display);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(244, 174, 26, .55);
    cursor: pointer;
}
.text-button:hover {
    text-decoration-color: var(--gold);
}
.form-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.suggest-result:not(:empty) {
    margin-top: 22px;
}
.notice {
    margin: 0 0 14px;
    padding: 14px 18px;
    border-left: 3px solid var(--gold);
    border-radius: 0 14px 14px 0;
    background: rgba(243, 241, 236, .05);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
}
.notice[data-tone=error] {
    border-left-color: var(--error);
    color: var(--error);
}
.notice[data-tone=done] {
    border-left-color: var(--added);
}
.preview .preview-title {
    margin: 0 0 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--muted);
}
.preview .channel-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(243, 241, 236, .04);
    box-shadow: inset 0 0 0 1px var(--line);
}
.preview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 16px;
}

/* The register */
.registry {
    margin-top: 72px;
}
.registry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}
.registry-head h2 {
    margin-bottom: 0;
}
.status-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.status-filter button {
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: none;
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--muted);
    font: 500 15px var(--display);
    cursor: pointer;
    transition: color .2s, background-color .2s;
}
.status-filter button:hover {
    color: var(--ink);
    background: rgba(243, 241, 236, .06);
}
.status-filter button[aria-pressed=true] {
    background: var(--ink);
    box-shadow: none;
    color: #0b0b0c;
}
.status-filter .count {
    opacity: .6;
    font-variant-numeric: tabular-nums;
}
.filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 20px 0 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.channel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.channel-list > li {
    border-bottom: 1px solid var(--line);
}
.channel-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 6px 20px;
    align-items: start;
    padding: 24px 0;
}
.channel-list > li[data-fresh] .channel-card {
    animation: fresh 2.4s ease-out;
}
@keyframes fresh {
    from { background: rgba(244, 174, 26, .16); }
    to { background: transparent; }
}
.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #1c1d23;
    box-shadow: 0 0 0 1px var(--line);
}
.avatar.placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font: 700 22px var(--display);
    text-transform: uppercase;
}
.card-body h3 {
    margin: 2px 0 6px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}
.card-body h3 a {
    text-decoration: none;
    transition: color .2s;
}
.card-body h3 a:hover {
    color: var(--gold);
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.card-meta span:first-child {
    font: 500 13px / 1.6 var(--mono);
}
.card-description {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    overflow-wrap: anywhere;
}
.card-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 12px 0 0;
}
.stamp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px 4px 9px;
    border-radius: 999px;
    background: rgba(243, 241, 236, .06);
    font: 500 11px / 1.4 var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.stamp::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.stamp[data-status=in_review] { color: var(--review); }
.stamp[data-status=in_progress] { color: var(--progress); }
.stamp[data-status=added] { color: var(--added); }
.stamp[data-status=rejected] { color: var(--rejected); }
.status-reason {
    font-size: 15px;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 168px;
}
.vote-button {
    display: inline-flex;
    align-items: stretch;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(243, 241, 236, .06);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink);
    font: 600 15px var(--display);
    cursor: pointer;
    transition: transform .25s var(--out), background-color .2s;
}
.vote-button:active {
    transform: scale(.96);
}
.vote-button > span {
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.vote-button .vote-count {
    min-width: 46px;
    justify-content: center;
    padding-left: 12px;
    border-left: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}
.vote-button:hover {
    background: rgba(243, 241, 236, .11);
}
.vote-button[aria-pressed=true] {
    background: var(--gold);
    box-shadow: none;
    color: #161004;
}
.vote-button[aria-pressed=true] .vote-count {
    border-left-color: rgba(22, 16, 4, .2);
}
.vote-button[aria-busy=true] {
    cursor: progress;
}
.vote-button[data-network] {
    cursor: default;
    opacity: .8;
}
.votes-static {
    padding: 12px 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
}
.vote-note {
    max-width: 230px;
    margin: 0;
    color: var(--error);
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
}
.vote-note[data-tone=info] {
    color: var(--muted);
}
.comments {
    grid-column: 2 / -1;
    margin: 4px 0 24px;
    padding: 18px 22px 20px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--line);
}
.comment-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.comment-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.comment-list li:last-child {
    border-bottom: 0;
}
.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--faint);
}
.comment-head strong {
    color: var(--ink);
    font-weight: 600;
}
.comment-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.comments-empty {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
}
.comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 12px;
}
.comment-form .field-text {
    grid-column: 2;
}
.comment-form .field-name {
    grid-row: 1;
}
.comment-form-foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}
.comment-form-foot p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.comment-form .counter {
    font-variant-numeric: tabular-nums;
}
.list-state {
    padding: 28px 0 6px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}
.list-more {
    display: flex;
    justify-content: center;
    padding-top: 28px;
}
.channels-page noscript p {
    font-size: 17px;
    color: var(--muted);
}

@media (max-width: 760px) {
    .suggest {
        padding: 22px 18px 20px;
        border-radius: 24px;
    }
    .suggest-form,
    .filters {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .suggest-form .field-link,
    .filters .field-search {
        grid-column: 1 / -1;
    }
    .suggest-form .press-button {
        width: 100%;
    }
    .registry {
        margin-top: 56px;
    }
    .channel-card {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 6px 14px;
    }
    .avatar {
        width: 44px;
        height: 44px;
    }
    .card-body h3 {
        font-size: 18px;
    }
    .card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        margin-top: 8px;
    }
    .vote-note {
        text-align: left;
        max-width: none;
        flex-basis: 100%;
    }
    .comments {
        grid-column: 1 / -1;
        padding: 16px 16px 18px;
    }
    .comment-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .comment-form .field-text,
    .comment-form .field-name {
        grid-column: 1;
        grid-row: auto;
    }
}
@media (max-width: 420px) {
    .suggest-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .suggest-form .field-region {
        grid-column: 1;
    }
    .filters {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .channel-list > li[data-fresh] .channel-card {
        animation: none;
    }
}
