.container-narrow {
    max-width: 760px;
}

.breadcrumb {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
    text-decoration: underline;
}

.topic-title {
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
    overflow-wrap: anywhere;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


.forum-list {
    list-style: none;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.forum-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 7.5rem 13rem;
    grid-template-areas: "icon main stats last";
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    transition: background-color 0.15s;
}

.forum-row + .forum-row {
    border-top: 1px solid var(--border);
}

.forum-row:hover {
    background: var(--surface-2);
}

.forum-icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--link);
    font-size: 1.1rem;
}

.forum-row:hover .forum-icon {
    background: var(--bg);
}

.forum-row-main {
    grid-area: main;
    min-width: 0;
}

.forum-row-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.forum-row-title:hover {
    color: var(--link);
}

.forum-row-main p {
    margin-top: 0.15rem;
    font-size: 0.9rem;
}

.forum-row-stats {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.stat strong {
    color: var(--text);
    font-size: 0.95rem;
}

.forum-row-last {
    grid-area: last;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border);
    font-size: 0.85rem;
}

.forum-row-last a,
.forum-row-last > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-row-last a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.forum-row-last a:hover {
    color: var(--link);
    text-decoration: underline;
}

.forum-cta {
    margin-top: 1.5rem;
    text-align: center;
}

@media (max-width: 760px) {
    .forum-row {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        grid-template-areas:
            "icon main"
            ".    stats"
            ".    last";
        align-items: start;
        gap: 0.35rem 0.9rem;
        padding: 1rem;
    }

    .forum-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .forum-row-stats {
        flex-direction: row;
        gap: 1rem;
    }

    .forum-row-last {
        flex-flow: row wrap;
        gap: 0 0.4rem;
        padding-left: 0;
        border-left: 0;
    }

    .forum-row-last a {
        flex-basis: 100%;
    }
}


.post {
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    scroll-margin-top: calc(var(--header-h) + 1rem);
}

.post:target {
    border-color: var(--link);
    box-shadow: 0 0 0 1px var(--link);
}

.post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.avatar {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 700;
}

.post-date {
    margin-left: auto;
    font-size: 0.85rem;
    text-decoration: none;
}

.post-date:hover {
    text-decoration: underline;
}

.post-body {
    padding: 1.1rem 1.25rem 1.25rem;
    overflow-wrap: anywhere;
}


.form-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.reply {
    margin-top: 2rem;
}

.reply h2 {
    margin-bottom: 0.9rem;
    font-size: 1.15rem;
}

.form-card .btn[type="submit"] {
    margin-top: 0.25rem;
}

.field textarea,
.field select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

.field textarea:focus,
.field select:focus {
    border-color: var(--link);
}
