:root {
    --cf-navy: #0c1b33;
    --cf-blue: #1b4f9c;
    --cf-blue-light: #2f6fdb;
    --cf-red: #d16666;
    --cf-red-deep: #a04444;
    --cf-surface: #eef2f8;
    --cf-card: #ffffff;
    --cf-text: #141824;
    --cf-muted: #5c6478;
    --cf-border: #d7deea;
    --cf-success: #0d6b4f;
    --cf-radius: 12px;
    --cf-radius-sm: 8px;
    --cf-shadow: 0 8px 28px rgba(12, 27, 51, 0.08);
    --cf-font: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--cf-font);
    color: var(--cf-text);
    background: linear-gradient(180deg, var(--cf-surface) 0%, #e3e9f3 100%);
    min-height: 100vh;
}

a {
    color: var(--cf-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.topbar {
    background: linear-gradient(90deg, var(--cf-navy) 0%, var(--cf-blue) 55%, var(--cf-blue-light) 100%);
    color: #fff;
    box-shadow: var(--cf-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}
.brand:hover {
    text-decoration: none;
    opacity: 0.95;
}

.brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: conic-gradient(from 210deg, var(--cf-red), #fff 40%, var(--cf-blue-light));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    font-size: 0.95rem;
}

.nav a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
}
.nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.nav__muted {
    opacity: 0.85;
    font-weight: 400 !important;
}

.main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.footer {
    border-top: 1px solid var(--cf-border);
    background: rgba(255, 255, 255, 0.65);
    padding: 1.25rem;
    font-size: 0.875rem;
    color: var(--cf-muted);
}
.footer__inner {
    max-width: 1120px;
    margin: 0 auto;
}
.footer p {
    margin: 0;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--cf-card);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    box-shadow: var(--cf-shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card__title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cf-navy);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--cf-radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
    text-decoration: none;
}
.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: linear-gradient(180deg, var(--cf-red) 0%, var(--cf-red-deep) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(209, 102, 102, 0.35);
}
.btn--primary:hover {
    filter: brightness(1.05);
}

.btn--secondary {
    background: var(--cf-card);
    color: var(--cf-blue);
    border: 1px solid var(--cf-border);
}
.btn--secondary:hover {
    border-color: var(--cf-blue-light);
}

.btn--sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
}

.field {
    margin-bottom: 1rem;
}
.field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--cf-navy);
}
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--cf-radius-sm);
    border: 1px solid var(--cf-border);
    font-family: inherit;
    font-size: 1rem;
}
.field textarea {
    min-height: 100px;
    resize: vertical;
}
.field--inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.field--inline label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--cf-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.925rem;
}
.alert--error {
    background: #fdecef;
    border: 1px solid #f5bcc9;
    color: #6b1024;
}
.alert--success {
    background: #e6f7f0;
    border: 1px solid #b8e6d3;
    color: var(--cf-success);
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem 0 1rem;
}
@media (max-width: 800px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.12;
    color: var(--cf-navy);
}

.hero p {
    margin: 0 0 1.5rem;
    color: var(--cf-muted);
    font-size: 1.05rem;
    max-width: 36rem;
}

.hero__panel {
    background: var(--cf-card);
    border-radius: 16px;
    border: 1px solid var(--cf-border);
    padding: 1.5rem;
    box-shadow: var(--cf-shadow);
}
.hero__stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.pill {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(27, 79, 156, 0.1);
    color: var(--cf-blue);
}

.stories {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    scrollbar-width: thin;
}
.story-ring {
    flex: 0 0 auto;
    width: 76px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
}
.story-ring__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 0.35rem;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, var(--cf-red), var(--cf-blue-light)) border-box;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--cf-navy);
    background-color: #e8edf6;
}
.story-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-ring span {
    font-size: 0.72rem;
    color: var(--cf-muted);
    display: block;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.composer textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    padding: 0.65rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.composer__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}

.post {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--cf-border);
}
.post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.post__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e8edf6;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--cf-navy);
}
.post__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post__meta {
    font-size: 0.85rem;
    color: var(--cf-muted);
}
.post__meta strong {
    color: var(--cf-navy);
    font-weight: 600;
}
.post__body {
    white-space: pre-wrap;
    line-height: 1.5;
}

.post__media {
    margin-top: 0.75rem;
    border-radius: var(--cf-radius-sm);
    overflow: hidden;
    border: 1px solid var(--cf-border);
}
.post__media img,
.post__media video {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    background: #0a0f18;
}

.ads .ad {
    border: 1px dashed var(--cf-border);
    border-radius: var(--cf-radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(180deg, #fafbff, #fff);
}
.ads .ad:last-child {
    margin-bottom: 0;
}
.ads .ad small {
    color: var(--cf-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.65rem;
}

.profile-header {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.cover {
    width: 100%;
    height: 180px;
    border-radius: var(--cf-radius);
    background: linear-gradient(90deg, var(--cf-navy), var(--cf-blue-light));
    overflow: hidden;
}
.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-header__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-top: -48px;
    border: 4px solid var(--cf-card);
    background: #e8edf6;
    overflow: hidden;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cf-navy);
}
.profile-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal[hidden] {
    display: none !important;
}
.modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 28, 0.72);
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.modal__box {
    background: #0a0f18;
    color: #fff;
    max-width: 520px;
    width: 100%;
    border-radius: var(--cf-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}
.modal__media img,
.modal__media video {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}
.modal__caption {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

/* Feed: slim left rail (search / requests), dominant center column, ads right */
.main:has(.layout-feed) {
    max-width: 1360px;
    /* Sticky side columns: sit below sticky topbar, cap height for inner scroll */
    --cf-feed-sticky-top: 5.25rem;
    --cf-feed-sticky-max: calc(100dvh - 5.75rem);
}

/* Center scrolls with the main document (window scrollbar only). */
.layout-feed__main {
    min-width: 0;
    overflow-x: hidden;
}

.layout.layout-feed {
    grid-template-columns: minmax(228px, 268px) minmax(0, 1fr) minmax(228px, 268px);
    gap: 1rem 1.1rem;
    align-items: start;
}

.layout-feed > .sidebar {
    width: 100%;
    min-width: 0;
    position: sticky;
    top: var(--cf-feed-sticky-top);
    align-self: start;
    max-height: var(--cf-feed-sticky-max);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-right: 0.65rem;
    margin-right: 0.15rem;
    border-right: 1px solid var(--cf-border);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.layout-feed > .feed-right-rail {
    width: 100%;
    min-width: 0;
    position: sticky;
    top: var(--cf-feed-sticky-top);
    align-self: start;
    max-height: var(--cf-feed-sticky-max);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.layout-feed > .feed-right-rail .ads {
    width: 100%;
    box-sizing: border-box;
}

.layout-feed > .feed-right-rail .sidebar__block .card__title {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cf-muted);
}

.layout-feed .sidebar .sidebar__block.card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0.65rem 0.7rem;
    margin-bottom: 0.6rem;
}

.layout-feed .sidebar .card__title {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cf-muted);
}

.layout-feed .friend-search-form {
    gap: 0.35rem;
}

.layout-feed .friend-search-form__input {
    font-size: 0.78rem;
    padding: 0.32rem 0.45rem;
}

.layout-feed .friend-search-form .btn--sm {
    padding: 0.32rem 0.45rem;
    font-size: 0.72rem;
    width: 100%;
}

.layout-feed .sidebar__hint,
.layout-feed .sidebar__empty {
    font-size: 0.68rem;
    margin-top: 0.35rem;
    line-height: 1.35;
}

.layout-feed .sidebar__section-label {
    font-size: 0.65rem;
    margin-top: 0.5rem;
}

.layout-feed .friend-search-results {
    margin-top: 0.45rem;
    max-height: 12rem;
    overflow-y: auto;
}

.layout-feed .friend-search-results__item {
    font-size: 0.72rem;
    padding: 0.35rem 0;
}

.layout-feed .sidebar__badge {
    font-size: 0.65rem;
    margin-left: 0;
    display: block;
    margin-top: 0.15rem;
}

.layout-feed .sidebar__inline-form {
    display: block;
    margin: 0.2rem 0 0;
}

.layout-feed .sidebar__inline-form .btn--sm {
    padding: 0.25rem 0.4rem;
    font-size: 0.68rem;
    width: 100%;
    margin-top: 0.2rem;
}

.layout-feed .friend-req-list__item {
    font-size: 0.72rem;
    padding: 0.35rem 0;
}

.layout-feed .friend-req-list__actions {
    flex-direction: column;
    align-items: stretch;
}

.layout-feed .friend-req-list__actions .btn--sm {
    width: 100%;
}

@media (max-width: 1024px) {
    .layout.layout-feed {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .layout-feed__main,
    .layout-feed > .sidebar,
    .layout-feed > .feed-right-rail {
        min-height: 0;
        max-height: none;
        overflow: visible;
        overscroll-behavior: auto;
    }

    .layout-feed > .sidebar,
    .layout-feed > .feed-right-rail {
        position: static;
        top: auto;
        align-self: stretch;
    }

    .layout-feed > .sidebar {
        padding-right: 0;
        margin-right: 0;
        border-right: none;
        max-width: none;
    }

    .layout-feed .friend-search-form .btn--sm,
    .layout-feed .sidebar__inline-form .btn--sm,
    .layout-feed .friend-req-list__actions .btn--sm {
        width: auto;
    }

    .layout-feed .friend-req-list__actions {
        flex-direction: row;
    }
}

.sidebar .sidebar__block {
    margin-bottom: 1rem;
}

.sidebar__hint,
.sidebar__empty {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--cf-muted);
}

.sidebar__section-label {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cf-muted);
}

.sidebar__badge {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cf-success);
}

.sidebar__badge--muted {
    color: var(--cf-muted);
}

.friend-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friend-search-form__input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
}

.friend-search-results {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.friend-search-results__item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cf-border);
    font-size: 0.88rem;
}

.friend-search-results__item:last-child {
    border-bottom: none;
}

.friend-search-results__name {
    font-weight: 600;
    display: inline-block;
    margin-right: 0.25rem;
}

.sidebar__inline-form {
    display: inline-block;
    margin: 0.25rem 0.35rem 0 0;
    vertical-align: middle;
}

.friend-req-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.friend-req-list__item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cf-border);
    font-size: 0.88rem;
}

.friend-req-list__item:last-child {
    border-bottom: none;
}

.friend-req-list__name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.friend-req-list__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.wall-posts-list {
    min-height: 2rem;
}

/* Feed composers: fancy launch buttons + collapsible panels */
.feed-composer-launch {
    padding: 1rem 1.15rem;
}

.feed-fancy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.feed-fancy-btn {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    background: linear-gradient(145deg, #ffffff 0%, #f0f4fb 100%);
    box-shadow: 0 4px 18px rgba(12, 27, 51, 0.07);
    transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    color: var(--cf-navy);
}

.feed-fancy-btn:hover {
    border-color: var(--cf-blue-light);
    box-shadow: 0 8px 24px rgba(27, 79, 156, 0.12);
}

.feed-fancy-btn:active {
    transform: translateY(1px);
}

.feed-fancy-btn[aria-expanded="true"] {
    border-color: var(--cf-blue);
    box-shadow: 0 0 0 2px rgba(27, 79, 156, 0.2), 0 6px 22px rgba(12, 27, 51, 0.1);
    background: linear-gradient(145deg, #f8faff 0%, #e8eef8 100%);
}

.feed-fancy-btn--story .feed-fancy-btn__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cf-red) 0%, var(--cf-red-deep) 100%);
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(209, 102, 102, 0.35);
}

.feed-fancy-btn--wall .feed-fancy-btn__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cf-blue) 0%, var(--cf-blue-light) 100%);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(27, 79, 156, 0.3);
}

.feed-fancy-btn__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.feed-fancy-btn__title {
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.feed-fancy-btn__sub {
    font-size: 0.78rem;
    color: var(--cf-muted);
    font-weight: 500;
}

.feed-expand-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cf-border);
    animation: feed-panel-in 0.2s ease-out;
}

@keyframes feed-panel-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.85rem;
}

.feed-panel-input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
}

.field-label-strong {
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.35rem;
    color: var(--cf-navy);
}

/* Feed sidebar / right-rail widgets (overview, tips, toolkit) */
.feed-overview-stats {
    margin: 0 0 0.65rem;
    padding: 0;
}

.feed-overview-card .card__title {
    text-align: center;
    letter-spacing: 0.06em;
}

.feed-overview-stats__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0;
    font-size: 0.78rem;
    border-bottom: 1px solid var(--cf-border);
}

.feed-overview-stats__row:last-child {
    border-bottom: none;
}

.feed-overview-stats__row dt {
    margin: 0;
    color: var(--cf-muted);
    font-weight: 600;
    flex: 0 1 auto;
    min-width: 0;
}

.feed-overview-stats__row dd {
    margin: 0;
    font-weight: 700;
    color: var(--cf-navy);
    text-align: right;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 58%;
    word-break: break-word;
}

.feed-overview-card .feed-profile-meter__label {
    justify-content: center;
    gap: 0.5rem;
}

.feed-overview-card .feed-sidebar-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.1rem;
    text-align: center;
}

.feed-profile-meter {
    margin-bottom: 0.65rem;
}

.feed-profile-meter__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cf-muted);
    margin-bottom: 0.28rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-profile-meter__bar {
    height: 6px;
    border-radius: 999px;
    background: var(--cf-border);
    overflow: hidden;
}

.feed-profile-meter__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cf-blue), var(--cf-blue-light));
    transition: width 0.25s ease;
}

.feed-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.feed-sidebar-links a {
    font-size: 0.78rem;
    font-weight: 600;
}

.feed-tip-list {
    margin: 0;
    padding: 0 0 0 1rem;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--cf-muted);
}

.feed-tip-list li {
    margin-bottom: 0.4rem;
}

.feed-tip-list li:last-child {
    margin-bottom: 0;
}

.feed-rail-linklist {
    margin: 0 0 0.5rem;
    padding: 0 0 0 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.feed-rail-linklist li {
    margin-bottom: 0.35rem;
}

.feed-rail-note,
.feed-rail-lead {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--cf-muted);
}

.feed-rail-lead {
    margin-bottom: 0.5rem;
}

.feed-rail-widget--accent {
    background: linear-gradient(165deg, #f8fafc 0%, #eef3fb 100%);
    border-color: #c8d6ea;
}

.feed-sidebar-widget--tips .card__title {
    color: var(--cf-navy);
}

/* ---- Accessibility ---- */
.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;
}

/* ---- Post social: likes, comments, share ---- */
.post--social {
    position: relative;
}

.post-wall-share-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.07) 0%, rgba(30, 58, 138, 0.09) 100%);
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.post-wall-share-banner__icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--cf-blue), var(--cf-blue-light));
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}

.post-wall-share-banner__text {
    flex: 1;
    min-width: 12rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--cf-navy);
}

.post-wall-share-banner__text a {
    font-weight: 700;
    color: var(--cf-blue);
}

.post-wall-share-banner__text time {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cf-muted);
}

.post-wall-share-banner__note {
    width: 100%;
    margin: 0.15rem 0 0;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(37, 99, 235, 0.2);
    font-size: 0.8rem;
    color: var(--cf-navy);
    line-height: 1.4;
    font-style: italic;
}

.post-social {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cf-border);
}

.post-social__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
}

.post-social__bar--muted {
    font-size: 0.78rem;
    color: var(--cf-muted);
    gap: 0.35rem;
}

.post-social__login-hint {
    margin-left: auto;
    font-size: 0.78rem;
}

.post-social__action {
    margin: 0;
}

.post-social__action--inline {
    display: inline;
    margin-left: auto;
}

.post-social__like {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--cf-border);
    background: linear-gradient(180deg, #fff 0%, #f4f7fc 100%);
    color: var(--cf-navy);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    font-family: inherit;
}

.post-social__like:hover {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.12);
}

.post-social__like:active {
    transform: scale(0.98);
}

.post-social__like.is-liked {
    border-color: rgba(220, 38, 38, 0.45);
    background: linear-gradient(180deg, #fff5f5 0%, #ffe4e6 100%);
    color: #b91c1c;
}

.post-social__like-icon {
    font-size: 1rem;
    line-height: 1;
}

.post-social__stat {
    font-size: 0.78rem;
    color: var(--cf-muted);
    font-weight: 600;
}

.post-social__ghost {
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--cf-blue);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.post-social__ghost:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.post-social__share-panel {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fafbfd;
    border: 1px solid var(--cf-border);
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.06);
}

.post-social__share-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.post-social__share-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cf-muted);
}

.post-social__share-select,
.post-social__share-note {
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--cf-border);
    background: #fff;
    color: var(--cf-navy);
}

.post-social__share-note::placeholder {
    color: #94a3b8;
}

.post-social__share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.post-comments {
    margin-top: 1rem;
}

.post-comments__triggers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    align-items: center;
}

.post-comments__fancy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: linear-gradient(145deg, #fff 0%, #eef4ff 100%);
    color: var(--cf-navy);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

.post-comments__fancy:hover {
    border-color: var(--cf-blue);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.post-comments__fancy:active {
    transform: scale(0.98);
}

.post-comments__fancy[aria-expanded="true"] {
    border-color: var(--cf-blue);
    background: linear-gradient(145deg, #e8f0fe 0%, #dbeafe 100%);
}

.post-comments__fancy--alt {
    border-color: rgba(30, 58, 138, 0.22);
    background: linear-gradient(145deg, #fafbfc 0%, #f1f5f9 100%);
}

.post-comments__fancy--alt:hover {
    border-color: rgba(37, 99, 235, 0.4);
}

.post-comments__fancy--alt[aria-expanded="true"] {
    background: linear-gradient(145deg, #e8eef7 0%, #e2e8f0 100%);
}

.post-comments__fancy-icon {
    font-size: 0.85rem;
    opacity: 0.88;
    line-height: 1;
}

.post-comments__fancy-text {
    letter-spacing: 0.01em;
}

.post-comments__fancy-count {
    min-width: 1.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cf-blue), var(--cf-blue-light));
    color: #fff;
    line-height: 1.2;
}

.post-comments__fancy--alt .post-comments__fancy-count {
    background: linear-gradient(135deg, #475569, #64748b);
}

.post-comments__panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--cf-border);
}

.post-comments__panel .post-comments__composer {
    border-top: none;
    padding-top: 0;
}

.post-comments__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.post-comments__title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cf-muted);
}

.post-comments__filter select {
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--cf-border);
    background: #fff;
    color: var(--cf-navy);
    font-weight: 600;
}

.post-comments__list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 22rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.post-comments__item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.85);
}

.post-comments__avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cf-blue-light), var(--cf-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.post-comments__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-comments__avatar a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.post-comments__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.post-comments__meta a {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--cf-navy);
}

.post-comments__meta time {
    font-size: 0.68rem;
    color: var(--cf-muted);
    font-weight: 600;
}

.post-comments__text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #334155;
}

.post-comments__composer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--cf-border);
}

.post-comments__textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--cf-border);
    resize: vertical;
    min-height: 3.25rem;
    background: #fff;
    color: var(--cf-navy);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-comments__textarea:focus {
    outline: none;
    border-color: var(--cf-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.feed-wall-form__link {
    width: 100%;
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--cf-border);
    background: #fff;
    color: var(--cf-navy);
}

.post__embed {
    margin: 0.65rem 0 0;
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 9;
    max-height: min(70vh, 540px);
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.12);
}

.post__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.post__embed-yt-slot {
    position: absolute;
    inset: 0;
}

.post__embed--yt iframe {
    width: 100% !important;
    height: 100% !important;
}

.post__embed-sound {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease, transform 0.1s ease;
    font-family: inherit;
    padding: 0;
}

.post__embed-sound:hover {
    background: rgba(30, 41, 59, 0.95);
}

.post__embed-sound:active {
    transform: scale(0.96);
}

.post__embed-sound-inner {
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
}

.post__embed-sound:not(.is-unmuted) .post__embed-sound-icon--on {
    display: none;
}

.post__embed-sound.is-unmuted .post__embed-sound-icon--off {
    display: none;
}

.post__link-card {
    margin: 0.65rem 0 0;
    border-radius: 12px;
    border: 1px solid var(--cf-border);
    background: linear-gradient(165deg, #f8fafc 0%, #fff 100%);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(30, 41, 59, 0.06);
}

.post__link-card-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.post__link-card-link:hover {
    background: rgba(37, 99, 235, 0.06);
}

.post__link-card-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cf-muted);
}

.post__link-card-url {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--cf-blue);
    word-break: break-all;
    line-height: 1.35;
}

.post__link-card-cta {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cf-navy);
    margin-top: 0.15rem;
}

/* Welcome / index (guest): light surface (same as body) + raster network image */
.main:has(.hero) {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--cf-surface);
    background-image: linear-gradient(
            180deg,
            rgba(238, 242, 248, 0.72) 0%,
            rgba(227, 233, 243, 0.88) 100%
        ),
        url("/assets/img/index-hero-network.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    min-height: calc(100dvh - 4.5rem);
}

.main:has(.hero) .hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
    box-sizing: border-box;
}
