:root {
    --bg: #080b0e;
    --bg-soft: #0b1015;
    --panel: #10161d;
    --panel-2: #141c24;
    --panel-3: #19232d;
    --line: #26333f;
    --line-soft: #1b2630;
    --text: #e9eff3;
    --muted: #8d9ba7;
    --dim: #67747f;
    --lime: #c3f75c;
    --lime-strong: #d4ff7c;
    --lime-dark: #9fd53a;
    --cyan: #6fe0ef;
    --red: #ff7272;
    --amber: #ffc66d;
    --radius: 16px;
    --radius-sm: 10px;
    --sans: "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 18% -10%, rgba(195, 247, 92, .10), transparent 32rem),
        radial-gradient(circle at 92% 0%, rgba(111, 224, 239, .07), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

::selection {
    background: rgba(195, 247, 92, .28);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4, p, dl, dd {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

code {
    font-family: var(--mono);
    font-size: .92em;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2a3743;
    border-radius: 10px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-track {
    background: transparent;
}

:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flip-x {
    transform: scaleX(-1);
}

.site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* ===== Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(8, 11, 14, .84);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    width: min(1240px, calc(100% - 40px));
    min-height: 70px;
    margin: 0 auto;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
}

.brand-sign {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(195, 247, 92, .55);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(195, 247, 92, .2), rgba(195, 247, 92, .04));
    color: var(--lime);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.08em;
    box-shadow: inset 0 0 18px rgba(195, 247, 92, .08);
}

.brand-text {
    color: var(--text);
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
}

.brand-text span {
    color: var(--lime);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1 1 auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: color .18s, background .18s;
}

.nav-link svg {
    width: 16px;
    height: 16px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.nav-link.is-active {
    background: rgba(195, 247, 92, .09);
    color: var(--lime);
}

.header-user {
    margin-left: auto;
    flex: 0 0 auto;
}

.user-menu {
    position: relative;
}

.user-menu > summary {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 7px 5px 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    list-style: none;
    transition: border-color .18s, background .18s;
}

.user-menu > summary::-webkit-details-marker {
    display: none;
}

.user-menu > summary:hover,
.user-menu[open] > summary {
    border-color: var(--line);
    background: var(--panel);
}

.user-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.user-meta strong {
    max-width: 150px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta small {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.chevron {
    width: 15px;
    height: 15px;
    color: var(--dim);
    transition: transform .2s;
}

.user-menu[open] .chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 224px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0e151b;
    box-shadow: var(--shadow);
    animation: pop .15s ease-out;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-head {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
    padding: 9px 11px 10px;
    border-bottom: 1px solid var(--line-soft);
}

.dropdown-head span {
    font-weight: 700;
}

.dropdown-head small {
    color: var(--muted);
    font-size: 11.5px;
}

.user-dropdown > a,
.user-dropdown form button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    text-align: left;
    transition: background .15s, color .15s;
}

.user-dropdown form {
    margin-top: 4px;
    border-top: 1px solid var(--line-soft);
    padding-top: 4px;
}

.user-dropdown > a:hover,
.user-dropdown form button:hover {
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.user-dropdown form button:hover {
    color: var(--red);
}

.user-dropdown svg {
    width: 16px;
    height: 16px;
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: transparent;
}

.menu-toggle span {
    width: 16px;
    height: 1.5px;
    background: var(--text);
    transition: transform .2s;
}

body.nav-open .menu-toggle span:first-child {
    transform: translateY(3.25px) rotate(45deg);
}

body.nav-open .menu-toggle span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
}

/* ===== Layout ===== */

.page-content {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 86px;
    flex: 1;
}

.site-footer {
    display: flex;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 34px;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line-soft);
    color: var(--dim);
    font-size: 12.5px;
}

.site-footer > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
}

.footer-meta {
    text-align: right;
}

/* ===== Common ===== */

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(20, 28, 36, .88), rgba(14, 20, 26, .94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-head h1 {
    margin-top: 6px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.03;
    letter-spacing: -.035em;
}

.page-head p {
    max-width: 670px;
    margin-top: 9px;
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lime);
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.signal {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px rgba(195, 247, 92, .11);
}

.accent {
    color: var(--lime);
}

.muted-note {
    color: var(--muted);
    font-size: 13.5px;
}

.muted-note a {
    color: var(--lime);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link {
    color: var(--lime);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nowrap {
    white-space: nowrap;
}

.align-right {
    text-align: right;
}

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: border-color .18s, background .18s, color .18s, transform .18s;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--lime);
    color: #101609;
    box-shadow: 0 8px 24px rgba(195, 247, 92, .14);
}

.btn-primary:hover {
    background: var(--lime-strong);
}

.btn-secondary {
    border-color: var(--line);
    background: var(--panel-3);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: #384858;
    background: #202c37;
}

.btn-ghost {
    border-color: var(--line);
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    border-color: #374553;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

.btn-danger-ghost {
    border-color: rgba(255, 114, 114, .28);
    background: rgba(255, 114, 114, .05);
    color: var(--red);
}

.btn-danger-ghost:hover {
    border-color: rgba(255, 114, 114, .55);
    background: rgba(255, 114, 114, .1);
}

.btn-sm {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12.5px;
}

.btn-wide {
    width: 100%;
}

.icon-btn {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    transition: border-color .18s, background .18s, color .18s;
}

.icon-btn:hover {
    border-color: #3a4957;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.icon-btn-danger:hover {
    border-color: rgba(255, 114, 114, .45);
    background: rgba(255, 114, 114, .08);
    color: var(--red);
}

.icon-btn-restore:hover {
    border-color: rgba(195, 247, 92, .4);
    background: rgba(195, 247, 92, .07);
    color: var(--lime);
}

/* ===== Avatars / badges ===== */

.avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: linear-gradient(145deg, #263541, #151e26);
    color: var(--lime);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-xs { width: 26px; height: 26px; font-size: 10px; }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-md { width: 46px; height: 46px; font-size: 16px; }
.avatar-xl { width: 104px; height: 104px; font-size: 34px; }

.avatar-letter {
    line-height: 1;
    text-transform: uppercase;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.5;
    text-transform: uppercase;
}

.role-admin {
    border-color: rgba(255, 114, 114, .3);
    background: rgba(255, 114, 114, .08);
    color: #ff9b9b;
}

.role-moderator {
    border-color: rgba(111, 224, 239, .3);
    background: rgba(111, 224, 239, .08);
    color: var(--cyan);
}

.role-user {
    border-color: var(--line);
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
}

.visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 198, 109, .23);
    border-radius: 5px;
    background: rgba(255, 198, 109, .055);
    color: var(--amber);
    font-size: 10.5px;
    font-weight: 600;
}

.visibility-badge svg {
    width: 13px;
    height: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active {
    background: rgba(195, 247, 92, .08);
    color: var(--lime);
}

.status-banned {
    background: rgba(255, 114, 114, .09);
    color: var(--red);
}

/* ===== Flash ===== */

.flash {
    display: flex;
    position: relative;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 13.5px;
    animation: flash-in .25s ease-out;
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash > svg {
    width: 18px;
    height: 18px;
}

.flash-success {
    border-color: rgba(195, 247, 92, .25);
    background: rgba(195, 247, 92, .07);
    color: #d8ffa0;
}

.flash-error {
    border-color: rgba(255, 114, 114, .3);
    background: rgba(255, 114, 114, .07);
    color: #ffb4b4;
}

.flash-close {
    display: grid;
    width: 26px;
    height: 26px;
    margin-left: auto;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    opacity: .65;
}

.flash-close:hover {
    background: rgba(255, 255, 255, .07);
    opacity: 1;
}

.flash-close svg {
    width: 14px;
    height: 14px;
}

/* ===== Hero / search ===== */

.hero {
    margin-bottom: 24px;
    padding: 20px 0 8px;
}

.hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(46px, 7vw, 86px);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: .93;
}

.hero-copy p {
    max-width: 650px;
    color: var(--muted);
    font-size: 16px;
}

.hero-stats {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(16, 22, 29, .6);
    overflow: hidden;
}

.hero-stats > div {
    display: flex;
    min-width: 100px;
    flex-direction: column;
    padding: 15px 18px;
    border-right: 1px solid var(--line-soft);
}

.hero-stats > div:last-child {
    border-right: 0;
}

.hero-stats strong {
    color: var(--text);
    font-family: var(--mono);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.1;
}

.hero-stats span {
    color: var(--dim);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.search-panel {
    margin-bottom: 34px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(14, 20, 26, .76);
    box-shadow: var(--shadow);
}

.search-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.search-field {
    display: flex;
    min-height: 46px;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--bg-soft);
    transition: border-color .18s, background .18s;
}

.search-field:focus-within {
    border-color: rgba(195, 247, 92, .5);
    background: #0a0f14;
}

.search-field svg {
    width: 18px;
    height: 18px;
    color: var(--dim);
}

.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search-field input::placeholder {
    color: #5f6b75;
}

.search-field-sm {
    min-height: 38px;
    max-width: 360px;
}

.filter-panel {
    margin-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.filter-panel > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 6px 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    list-style: none;
}

.filter-panel > summary::-webkit-details-marker {
    display: none;
}

.filter-panel > summary span:first-child {
    display: flex;
    align-items: center;
    gap: 7px;
}

.filter-panel > summary svg {
    width: 15px;
    height: 15px;
    color: var(--lime);
}

.filter-count {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 9px;
    background: var(--lime);
    color: #101609;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 14px 6px 8px;
}

.filter-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.filter-group-head h3 {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.filter-group-head span {
    color: var(--dim);
    font-size: 11px;
}

.filter-chips {
    display: flex;
    max-height: 130px;
    flex-wrap: wrap;
    gap: 6px;
    overflow: auto;
    padding-right: 4px;
}

.filter-chip {
    position: relative;
    cursor: pointer;
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-chip > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .016);
    color: var(--muted);
    font-size: 12px;
    transition: border-color .16s, background .16s, color .16s;
}

.filter-chip > span em {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9.5px;
    font-style: normal;
}

.filter-chip > span svg {
    width: 12px;
    height: 12px;
}

.filter-chip:hover > span {
    border-color: #384654;
    color: var(--text);
}

.filter-chip input:checked + span {
    border-color: rgba(195, 247, 92, .45);
    background: rgba(195, 247, 92, .09);
    color: var(--lime);
}

.filter-chip input:checked + span em {
    color: var(--lime-dark);
}

.filter-chip input:focus-visible + span {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 2px;
}

.filter-hint {
    color: var(--dim);
    font-size: 11.5px;
}

/* ===== Article feed ===== */

.feed-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.feed-head h2 {
    font-size: 21px;
    letter-spacing: -.02em;
}

.feed-head > div > span {
    color: var(--dim);
    font-size: 12px;
}

.article-list {
    display: grid;
    gap: 12px;
}

.article-card {
    padding: 20px 22px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(20, 28, 37, .72), rgba(13, 19, 25, .9));
    transition: border-color .18s, transform .18s, background .18s;
}

.article-card:hover {
    border-color: #344350;
    background:
        linear-gradient(145deg, rgba(24, 33, 43, .82), rgba(14, 20, 27, .95));
    transform: translateY(-1px);
}

.article-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.author-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.author-line > div {
    min-width: 0;
}

.author-name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.author-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.author-line time,
.article-meta time,
.comment-head time {
    display: block;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 10.5px;
}

.article-card-body {
    padding: 14px 0 16px;
}

.article-card-body h2 {
    max-width: 900px;
    font-size: clamp(20px, 2.4vw, 27px);
    letter-spacing: -.025em;
    line-height: 1.2;
}

.article-card-body h2 a {
    transition: color .16s;
}

.article-card-body h2 a:hover {
    color: var(--lime);
}

.article-excerpt {
    max-width: 960px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
    transition: border-color .16s, color .16s, background .16s;
}

.chip svg {
    width: 11px;
    height: 11px;
}

.chip:hover {
    border-color: #3a4856;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

.chip-tag {
    font-family: var(--mono);
    font-size: 10.5px;
}

.chip-product {
    color: #b8c6d2;
}

.article-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 47px;
    border-top: 1px solid var(--line-soft);
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 11px;
}

.card-stats > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-stats svg {
    width: 14px;
    height: 14px;
}

.stat-positive { color: #a9dc5a; }
.stat-neutral { color: #76c7d3; }
.stat-negative { color: #d67b7b; }

.edited-mark {
    color: #55616b;
    font-family: var(--sans);
    font-size: 10px;
    font-style: italic;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 700;
}

.read-more svg {
    width: 15px;
    height: 15px;
    transition: transform .16s;
}

.read-more:hover svg {
    transform: translateX(3px);
}

/* ===== Empty ===== */

.empty-state {
    display: grid;
    place-items: center;
    padding: 58px 22px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 17px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(195, 247, 92, .045);
    color: var(--lime);
}

.empty-icon svg {
    width: 25px;
    height: 25px;
}

.empty-state h2 {
    font-size: 23px;
}

.empty-state p {
    max-width: 460px;
    margin-top: 7px;
    color: var(--muted);
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

/* ===== Pagination ===== */

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
}

.pagination-summary {
    color: var(--dim);
    font-size: 12px;
}

.pagination-summary strong {
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11.5px;
    transition: border-color .16s, background .16s, color .16s;
}

a.page-btn:hover {
    border-color: #3a4857;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

.page-btn.is-current {
    border-color: var(--lime);
    background: var(--lime);
    color: #0d1307;
    font-weight: 700;
}

.page-btn.is-disabled {
    opacity: .28;
}

.page-arrow svg {
    width: 15px;
    height: 15px;
}

.page-dots {
    padding: 0 3px;
    color: var(--dim);
}

/* ===== Auth ===== */

.auth-shell {
    display: grid;
    min-height: calc(100vh - 270px);
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
    align-items: center;
    gap: clamp(40px, 8vw, 110px);
    padding: 28px 0;
}

.auth-intro h1 {
    margin: 18px 0 22px;
    font-size: clamp(48px, 7.4vw, 92px);
    letter-spacing: -.06em;
    line-height: .91;
}

.auth-intro p {
    max-width: 560px;
    color: var(--muted);
    font-size: 16px;
}

.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 30px;
    color: var(--muted);
    font-size: 12.5px;
}

.auth-points span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-points svg {
    width: 15px;
    height: 15px;
    color: var(--lime);
}

.auth-card {
    padding: 26px;
    box-shadow: var(--shadow);
}

.auth-card-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px;
}

.auth-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(195, 247, 92, .4);
    border-radius: 11px;
    background: rgba(195, 247, 92, .09);
    color: var(--lime);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.auth-card-head h2 {
    font-size: 22px;
    letter-spacing: -.02em;
}

.auth-card-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.5px;
}

.auth-note {
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--line-soft);
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.6;
}

/* ===== Forms ===== */

.validation-summary {
    display: none;
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 114, 114, .3);
    border-radius: 10px;
    background: rgba(255, 114, 114, .065);
    color: #ffb1b1;
    font-size: 13px;
}

.validation-summary:empty {
    display: none;
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.validation-summary.validation-summary-valid {
    display: none;
}

.validation-summary ul li + li {
    margin-top: 3px;
}

.form-stack {
    display: grid;
    gap: 17px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field > label {
    color: #c3ced7;
    font-size: 12px;
    font-weight: 600;
}

.field-spaced {
    margin-top: 18px;
}

.input {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: var(--bg-soft);
    color: var(--text);
    font-size: 13.5px;
    transition: border-color .18s, background .18s, box-shadow .18s;
}

.input:hover {
    border-color: #33414e;
}

.input:focus {
    border-color: rgba(195, 247, 92, .55);
    background: #090e12;
    box-shadow: 0 0 0 3px rgba(195, 247, 92, .07);
}

.input::placeholder {
    color: #56626c;
}

select.input {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #7b8894 50%),
        linear-gradient(135deg, #7b8894 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 11px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 34px;
}

.textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.65;
}

.field-error {
    color: #ff9b9b;
    font-size: 11.5px;
}

.field-error:empty {
    display: none;
}

.field-hint {
    color: var(--dim);
    font-size: 11.5px;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12.5px;
    cursor: pointer;
}

.check-line input {
    width: 16px;
    height: 16px;
    accent-color: var(--lime);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 5px;
}

.form-panel {
    padding: 24px;
}

.inline-form {
    display: flex;
    gap: 9px;
}

.inline-form .input {
    flex: 1;
}

.divider-label {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--dim);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.divider-label::before,
.divider-label::after {
    height: 1px;
    flex: 1;
    background: var(--line-soft);
    content: "";
}

.check-line input:focus-visible,
.file-inline input:focus-visible + span {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

/* ===== File inputs ===== */

.file-drop {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    padding: 11px 13px;
    border: 1px dashed #354452;
    border-radius: 9px;
    background: rgba(8, 13, 17, .42);
    transition: border-color .18s, background .18s;
}

.file-drop:hover,
.file-drop:focus-within {
    border-color: rgba(195, 247, 92, .45);
    background: rgba(195, 247, 92, .025);
}

.file-drop > input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.file-drop-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.file-drop-copy svg {
    width: 16px;
    height: 16px;
    color: var(--lime);
}

.file-drop-large {
    display: grid;
    min-height: 150px;
    margin-top: 12px;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.file-drop-label {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12.5px;
}

.file-drop-label strong {
    color: var(--text);
    font-size: 14px;
}

.file-drop-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(195, 247, 92, .05);
    color: var(--lime);
}

.file-drop-icon svg {
    width: 19px;
    height: 19px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-preview:not(:empty) {
    margin-top: 10px;
}

.file-preview-item {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    font-size: 11px;
}

.file-preview-item img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

.file-preview-item span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-inline {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
}

.file-inline svg {
    width: 16px;
    height: 16px;
    color: var(--lime);
}

.file-inline input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.existing-files {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.existing-file {
    display: flex;
    position: relative;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: rgba(8, 13, 17, .35);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
}

.existing-file > input {
    width: 15px;
    height: 15px;
    accent-color: var(--red);
}

.existing-file img {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    object-fit: cover;
}

.existing-file .file-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--lime);
}

.existing-file-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.existing-file-info span {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.existing-file-info small {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9.5px;
}

.remove-mark {
    margin-left: auto;
    color: var(--red);
    font-size: 10px;
    opacity: 0;
    transition: opacity .15s;
}

.existing-file:has(input:checked) {
    border-color: rgba(255, 114, 114, .4);
    background: rgba(255, 114, 114, .05);
}

.existing-file input:checked ~ .remove-mark,
.existing-file:hover .remove-mark {
    opacity: 1;
}

.existing-file:has(input:checked) .existing-file-info span {
    text-decoration: line-through;
    opacity: .65;
}

/* ===== Profile ===== */

.profile-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.profile-card {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 30px 22px;
    text-align: center;
}

.profile-card h2 {
    margin-top: 14px;
    font-size: 21px;
    letter-spacing: -.02em;
}

.profile-card > .role-badge,
.profile-card > .status-badge {
    margin-top: 7px;
}

.profile-facts {
    display: grid;
    width: 100%;
    gap: 9px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.profile-facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.profile-facts dt {
    color: var(--dim);
    font-size: 11.5px;
}

.profile-facts dd {
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
}

.profile-forms {
    display: grid;
    gap: 20px;
}

.profile-forms .panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 19px;
}

.panel-head h2 {
    font-size: 18px;
    letter-spacing: -.015em;
}

.panel-head p {
    max-width: 650px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12.5px;
}

.panel-counter {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 10px;
}

/* ===== Editor ===== */

.editor-head {
    margin-bottom: 22px;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 20px;
}

.editor-main {
    display: grid;
    gap: 18px;
}

.editor-main > .panel {
    padding: 23px;
}

.editor-side {
    min-width: 0;
}

.sticky-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.editor-textarea {
    min-height: 340px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.7;
}

.editor-textarea.is-drop-active {
    border-color: rgba(195, 247, 92, .55);
    background: rgba(195, 247, 92, .06);
    box-shadow: inset 0 0 0 1px rgba(195, 247, 92, .3);
}

.editor-submit {
    display: grid;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.choice-chip {
    position: relative;
    cursor: pointer;
}

.choice-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-chip > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .018);
    color: var(--muted);
    font-size: 12px;
    transition: border-color .16s, background .16s, color .16s;
}

.choice-chip > span em {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9px;
    font-style: normal;
}

.choice-chip > span svg {
    width: 12px;
    height: 12px;
}

.choice-chip:hover > span {
    border-color: #3a4856;
    color: var(--text);
}

.choice-chip input:checked + span {
    border-color: rgba(195, 247, 92, .45);
    background: rgba(195, 247, 92, .09);
    color: var(--lime);
}

.choice-chip input:focus-visible + span {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

/* ===== Article page ===== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .02em;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--lime);
}

.article-head {
    max-width: 1040px;
    margin-bottom: 24px;
}

.article-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.article-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.article-head h1 {
    max-width: 1000px;
    font-size: clamp(36px, 5.6vw, 64px);
    letter-spacing: -.045em;
    line-height: 1.03;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 21px;
    color: var(--muted);
}

.meta-author {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meta-author > div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.meta-divider {
    width: 1px;
    height: 25px;
    margin: 0 3px;
    background: var(--line);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
}

.meta-item svg {
    width: 14px;
    height: 14px;
}

.meta-item.muted {
    font-family: var(--sans);
    font-style: italic;
    color: var(--dim);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 22px;
}

.article-main {
    display: grid;
    min-width: 0;
    gap: 22px;
}

.article-content {
    padding: clamp(22px, 3.4vw, 36px);
}

.article-body {
    color: #d6dfe6;
    font-size: 16.5px;
    line-height: 1.82;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.article-inline-image {
    display: block;
    max-width: min(100%, 760px);
    max-height: 560px;
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #090d11;
}

.attachments-block {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
}

.attachment-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.attachment-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #090d11;
    transition: border-color .18s;
}

.attachment-image:hover {
    border-color: rgba(195, 247, 92, .45);
}

.attachment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.attachment-image:hover img {
    transform: scale(1.025);
}

.attachment-files {
    display: grid;
    gap: 7px;
}

.attachment-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(8, 13, 17, .35);
    transition: border-color .16s, background .16s;
}

.attachment-file:hover {
    border-color: #354451;
    background: rgba(255, 255, 255, .025);
}

.file-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--lime);
}

.file-icon svg {
    width: 15px;
    height: 15px;
}

.file-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.file-name {
    overflow: hidden;
    color: var(--text);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9.5px;
}

.download-icon {
    width: 16px;
    height: 16px;
    color: var(--dim);
}

.article-reaction-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
}

.reaction-label {
    color: var(--dim);
    font-size: 11.5px;
}

.reactions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reaction {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 10.5px;
    transition: border-color .16s, background .16s, color .16s;
}

.reaction svg {
    width: 14px;
    height: 14px;
}

.reaction:hover {
    border-color: #3b4956;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
}

.reaction-positive.is-active {
    border-color: rgba(195, 247, 92, .4);
    background: rgba(195, 247, 92, .08);
    color: var(--lime);
}

.reaction-neutral.is-active {
    border-color: rgba(111, 224, 239, .4);
    background: rgba(111, 224, 239, .08);
    color: var(--cyan);
}

.reaction-negative.is-active {
    border-color: rgba(255, 114, 114, .4);
    background: rgba(255, 114, 114, .08);
    color: var(--red);
}

/* ===== Comments ===== */

.comments-section {
    scroll-margin-top: 90px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    letter-spacing: -.02em;
}

.count-badge {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 6px;
    background: rgba(195, 247, 92, .08);
    color: var(--lime);
    font-family: var(--mono);
    font-size: 10px;
}

.section-hint {
    color: var(--dim);
    font-size: 11px;
}

.comment-form {
    margin-bottom: 15px;
    padding: 17px;
}

.comment-form-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.comment-form textarea {
    min-height: 88px;
    border-color: var(--line-soft);
    background: rgba(8, 13, 17, .55);
}

.comment-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.comment-form-foot .btn {
    margin-left: auto;
}

.file-preview-compact .file-preview-item {
    padding: 3px 6px;
}

.comment-list {
    display: grid;
    gap: 10px;
}

.comment {
    padding: 16px 17px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(16, 22, 29, .58);
    scroll-margin-top: 92px;
}

.comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.comment-body {
    color: #ccd7df;
    font-size: 13.5px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.comment .attachments-block {
    margin-top: 13px;
    padding-top: 13px;
}

.comment .attachment-gallery {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
}

.comment .reactions {
    margin-top: 12px;
}

.empty-comments {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    padding: 36px 20px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--dim);
    text-align: center;
}

.empty-comments svg {
    width: 24px;
    height: 24px;
    color: var(--muted);
}

/* ===== Article sidebar ===== */

.article-side {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 88px;
}

.side-card {
    padding: 18px;
}

.side-label {
    display: block;
    margin-bottom: 12px;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.author-card {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.author-card .side-label {
    align-self: flex-start;
}

.author-card h3 {
    margin-top: 9px;
    font-size: 17px;
}

.author-card > .role-badge {
    margin-top: 5px;
}

.author-card p {
    margin-top: 11px;
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.6;
}

.side-card .chip-row {
    margin-top: 0;
}

.side-value {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 12.5px;
}

.side-value svg {
    width: 15px;
    height: 15px;
    color: var(--amber);
}

.side-note {
    margin-top: 9px;
    color: var(--dim);
    font-size: 11px;
    line-height: 1.55;
}

.side-note .role-badge {
    vertical-align: middle;
}

.meta-list {
    display: grid;
    gap: 8px;
}

.meta-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.meta-list dt {
    color: var(--dim);
    font-size: 11px;
}

.meta-list dd {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    text-align: right;
}

/* ===== Admin ===== */

.toolbar-panel {
    margin-bottom: 15px;
    padding: 12px;
}

.toolbar-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.toolbar-count {
    margin-left: auto;
    color: var(--dim);
    font-size: 11.5px;
}

.data-panel {
    padding: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.data-table th {
    padding: 8px 11px;
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    padding: 11px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr {
    transition: background .15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, .018);
}

.row-banned {
    opacity: .62;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.table-user > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.table-user strong {
    color: var(--text);
    font-size: 13px;
}

.table-user span {
    max-width: 220px;
    overflow: hidden;
    color: var(--dim);
    font-size: 10.5px;
    text-overflow: ellipsis;
}

.activity-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 9.5px;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.table-empty-action {
    color: var(--dim);
}

.table-wrap {
    overflow-x: auto;
}

.empty-table {
    padding: 35px 20px;
    color: var(--dim);
    text-align: center;
}

.permission-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 15px;
    padding: 16px 18px;
}

.permission-note > svg {
    width: 20px;
    height: 20px;
    color: var(--lime);
}

.permission-note strong {
    font-size: 12.5px;
}

.permission-note p {
    margin-top: 3px;
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.6;
}

.product-list {
    display: grid;
    gap: 8px;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(8, 13, 17, .24);
}

.product-name {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
}

.product-name > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.product-name strong {
    font-size: 13px;
}

.product-name span {
    color: var(--dim);
    font-size: 10.5px;
}

.product-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--lime);
}

.product-icon svg {
    width: 15px;
    height: 15px;
}

.rename-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-sm {
    min-height: 34px;
    padding: 5px 9px;
    font-size: 12px;
}

.edit-user-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

/* ===== Status page ===== */

.status-page {
    display: flex;
    min-height: calc(100vh - 280px);
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.status-code {
    color: rgba(195, 247, 92, .16);
    font-family: var(--mono);
    font-size: clamp(100px, 20vw, 210px);
    font-weight: 700;
    letter-spacing: -.08em;
    line-height: .8;
}

.status-page h1 {
    margin-top: 12px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -.03em;
}

.status-page p {
    max-width: 500px;
    margin-top: 11px;
    color: var(--muted);
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.request-id {
    margin-top: 32px;
    color: var(--dim);
    font-size: 10.5px;
}

.request-id code {
    color: #788693;
}

/* ===== Responsive ===== */

@media (max-width: 1120px) {
    .hero-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .hero-stats > div {
        min-width: 120px;
    }

    .article-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
}

@media (max-width: 980px) {
    .main-nav {
        position: absolute;
        top: 70px;
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #0e151b;
        box-shadow: var(--shadow);
    }

    body.nav-open .main-nav {
        display: flex;
    }

    .nav-link {
        padding: 11px 12px;
    }

    .menu-toggle {
        display: flex;
        order: -1;
    }

    .header-inner {
        gap: 12px;
    }

    .brand {
        margin-right: auto;
    }

    .editor-layout,
    .profile-layout,
    .edit-user-layout,
    .article-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .author-card {
        grid-column: span 2;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 10px 0;
    }

    .auth-intro h1 {
        font-size: clamp(45px, 12vw, 70px);
    }

    .auth-intro p {
        max-width: 520px;
    }

    .filter-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-head > .btn {
        align-self: flex-start;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-meta {
        text-align: left;
    }

    .product-row {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .product-name {
        flex-basis: 100%;
    }

    .rename-form {
        flex: 1;
    }

    .rename-form .input {
        flex: 1;
    }
}

@media (max-width: 680px) {
    .header-inner,
    .page-content,
    .site-footer {
        width: min(100% - 28px, 1240px);
    }

    .page-content {
        padding-top: 24px;
    }

    .user-meta {
        display: none;
    }

    .hero-copy h1 {
        font-size: clamp(42px, 12vw, 60px);
    }

    .hero-stats {
        width: 100%;
    }

    .hero-stats > div {
        min-width: 0;
        flex: 1;
        padding: 12px;
    }

    .search-row {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .search-field {
        flex-basis: 100%;
    }

    .search-row > .btn {
        flex: 1;
    }

    .article-card {
        padding: 16px 16px 0;
    }

    .article-card-head {
        flex-direction: column;
        gap: 7px;
    }

    .article-card-foot {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 10px 0 12px;
    }

    .article-card-foot .read-more {
        display: none;
    }

    .pagination-wrap {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .article-meta {
        align-items: flex-start;
    }

    .meta-divider {
        display: none;
    }

    .article-head-top {
        flex-direction: column;
    }

    .article-side {
        grid-template-columns: 1fr;
    }

    .author-card {
        grid-column: auto;
    }

    .section-hint {
        display: none;
    }

    .article-reaction-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-form-foot {
        align-items: stretch;
    }

    .comment-form-foot .btn {
        margin-left: 0;
    }

    .file-preview {
        flex-basis: 100%;
    }

    .data-panel {
        padding: 11px;
    }

    .data-table {
        min-width: 760px;
    }

    .toolbar-count {
        width: 100%;
        margin-left: 0;
    }

    .inline-form {
        flex-direction: column;
    }

    .auth-card {
        padding: 21px;
    }

    .profile-forms .panel,
    .editor-main > .panel,
    .form-panel {
        padding: 18px;
    }

    .sticky-panel {
        padding: 18px;
    }

    .status-page {
        min-height: calc(100vh - 230px);
    }
}

@media (max-width: 470px) {
    .header-inner {
        min-height: 62px;
    }

    .brand-text {
        display: none;
    }

    .main-nav {
        top: 62px;
    }

    .hero-stats span {
        font-size: 9px;
    }

    .hero-stats strong {
        font-size: 20px;
    }

    .btn {
        padding: 0 13px;
    }

    .filter-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .attachment-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .page-btn {
        min-width: 31px;
        height: 31px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ===== Upload toasts (drag&drop изображений в редакторе) ===== */

.upload-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: grid;
    gap: 8px;
    max-width: min(360px, calc(100vw - 36px));
}

.upload-toast-item {
    padding: 11px 14px;
    border: 1px solid #5f3a3a;
    border-radius: 10px;
    background: #251317;
    color: #ffb4b4;
    font-size: 12.5px;
    line-height: 1.5;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
    transition: opacity .2s;
}
