/* Content-first front page (Reddit-style)
 *
 * Theme-aware: light palette by default; pages opt into the dark palette by
 * putting .fs-dark on <body> (dark theme cookie, or hub-dark tenant chrome). */

:root {
    --fs-bg: #f6f7f9;
    --fs-card: #ffffff;
    --fs-border: #e5e7eb;
    --fs-text: #111827;
    --fs-muted: #6b7280;
    --fs-faint: #9ca3af;
    --fs-hover: rgba(0,0,0,0.04);
    --fs-tab-active-text: #ffffff;
}
body.fs-dark {
    --fs-bg: #0f1115;
    --fs-card: #16181d;
    --fs-border: #23262d;
    --fs-text: #ffffff;
    --fs-muted: #9ca3af;
    --fs-faint: #6b7280;
    --fs-hover: rgba(255,255,255,0.04);
    --fs-tab-active-text: #0d0b08;
}

body.front-body { background: var(--fs-bg); color: var(--fs-text); }

.front-wrap { max-width: 1080px; margin: 0 auto; padding: 16px 16px 72px; }
.front-cols { display: flex; gap: 24px; align-items: flex-start; }
.front-main { flex: 1; min-width: 0; }
.front-side { width: 320px; flex-shrink: 0; position: sticky; top: 16px; }

/* Sort tabs */
.feed-sort-tabs {
    display: flex; gap: 8px; margin: 8px 0 16px;
}
.feed-sort-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    color: var(--fs-muted);
    background: var(--fs-card);
    border: 1px solid var(--fs-border);
    transition: color .15s ease, border-color .15s ease;
}
.feed-sort-tab:hover { color: var(--fs-text); text-decoration: none; border-color: var(--primary, #d4af37); }
.feed-sort-tab.active {
    color: var(--fs-tab-active-text);
    background: var(--primary, #d4af37);
    border-color: var(--primary, #d4af37);
}
.feed-sort-tab ion-icon { font-size: 16px; }

/* Sidebar cards */
.content-sidebar { display: flex; flex-direction: column; gap: 16px; }
.cs-card {
    background: var(--fs-card);
    border: 1px solid var(--fs-border);
    border-radius: 14px; padding: 16px;
}
.cs-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.cs-card-head h6 {
    margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; color: var(--fs-muted);
    display: inline-flex; align-items: center; gap: 6px;
}
.cs-card-head h6 ion-icon { font-size: 16px; color: var(--primary, #d4af37); }
.cs-card-link { font-size: 12.5px; font-weight: 600; color: var(--primary, #d4af37); text-decoration: none; }
.cs-card-link:hover { text-decoration: underline; }

.cs-list { display: flex; flex-direction: column; }
.cs-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 8px; margin: 0 -8px; border-radius: 10px;
    text-decoration: none; color: inherit;
}
.cs-row:hover { background: var(--fs-hover); text-decoration: none; color: inherit; }
.cs-row-img {
    width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
    background: var(--fs-border);
}
.cs-row-initial {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; color: var(--primary, #d4af37); font-size: 15px;
}
.cs-row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-row-name { font-weight: 600; font-size: 13.5px; color: var(--fs-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row-sub { font-size: 12px; color: var(--fs-faint); }

.cs-live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
    display: inline-block; animation: cs-pulse 1.6s ease infinite;
}
.cs-live-badge {
    flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: .5px;
    color: #fff; background: #ef4444; padding: 2px 7px; border-radius: 4px;
}
@keyframes cs-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 991px) {
    .front-side { display: none; }
}
@media (max-width: 575px) {
    .front-wrap { padding: 8px 8px 56px; }
}
