:root {
    --bg: #0f141a;
    --bg2: #07090c;
    --panel: #12161b;
    --border: #222831;
    --text: #e6e7e9;
    --muted: #9aa4af;
    --link: #89b4ff;
    --accent: #ff3b3b;
    --radius: 14px;
    --shadow: 0 10px 28px rgba(0, 0, 0, .35);
    --wrap: 920px;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--bg), var(--bg2));
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrap {
    max-width: var(--wrap);
    margin: 20px auto;
    padding: 0 16px;
}

/* Back button and counts */
.pagehead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.back {
    background: #1a1f27;
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 700;
}

.counts {
    color: var(--muted);
    font-size: 13px;
}

/* Feed list */
.feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
}

.idx {
    color: var(--muted);
    font-weight: 700;
    align-self: center;
}

/* Subreddit label in white shade */
.subreddit {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

/* Title style (from portal.html) */
.title {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
    margin: 0;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.fav {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Top bar */
.top-bar {
    background-color: #131415;
    color: #c9d1d9;
    padding: 5px 0;
    text-align: center;
    font-weight: 500;
}