.legal-prose {
    max-width: 42rem;
    margin: 0 auto;
}

.legal-prose h2 {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 2rem 0 0.75rem;
    color: var(--brand-900);
    letter-spacing: -0.01em;
}

.legal-prose h2:first-child {
    margin-top: 0;
}

.legal-prose p,
.legal-prose li {
    font-size: var(--text-body);
    line-height: 1.65;
    color: var(--brand-800);
}

@media (min-width: 768px) {
    .legal-prose p,
    .legal-prose li {
        font-size: var(--text-body-lg);
    }
}

.legal-prose ul {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.legal-prose li {
    margin-bottom: 0.5rem;
}

.legal-prose a {
    color: var(--brand-accent);
    font-weight: 600;
}

.faq-list {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--brand-200);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.125rem;
    font-size: var(--text-body-lg);
    font-weight: 700;
    color: var(--brand-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-accent);
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item__body {
    padding: 0 1.125rem 1.125rem;
    font-size: var(--text-body);
    line-height: 1.6;
    color: var(--brand-800);
}

.faq-item__body a {
    color: var(--brand-accent);
    font-weight: 600;
}

.legal-callout {
    margin: 1.25rem 0;
    padding: 1rem 1.125rem;
    border-left: 3px solid var(--brand-accent);
    background: var(--brand-50, #f8fafc);
    border-radius: 0 0.75rem 0.75rem 0;
}

.legal-callout p {
    margin: 0;
    font-size: var(--text-body);
    line-height: 1.6;
    color: var(--brand-800);
}

.community-hub__grid {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0;
}

@media (min-width: 640px) {
    .community-hub__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.community-hub__card {
    display: block;
    padding: 1.25rem 1.375rem;
    border: 1px solid var(--brand-200);
    border-radius: 1rem;
    background: var(--white);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-hub__card:hover {
    border-color: var(--brand-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.community-hub__card-title {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--brand-900);
}

.community-hub__card-body {
    margin: 0 0 0.75rem;
    font-size: var(--text-body);
    line-height: 1.55;
    color: var(--brand-800);
}

.community-hub__card-cta {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand-accent);
}

.community-hub__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* ---------------------------------------------------------------------------
   Community Board — unified feed (/community/)
--------------------------------------------------------------------------- */
.community-page {
    max-width: 46rem;
}

.community-page__head {
    margin: 0.5rem 0 1.25rem;
}

.community-page__head h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--brand-900);
    letter-spacing: -0.01em;
}

.community-page__subtitle {
    margin: 0;
    color: var(--brand-800);
    font-size: 1rem;
}

.community-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.community-ask {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.1rem;
    border: 1px solid var(--brand-200);
    border-radius: 9999px;
    background: var(--white, #fff);
    color: var(--brand-800);
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-ask:hover {
    border-color: var(--brand-accent);
    box-shadow: var(--kr-shadow-sm);
}

.community-search {
    position: relative;
    flex: 0 0 auto;
    width: 2.75rem;
    transition: width 0.2s ease;
}

.community-search:focus-within {
    width: min(15rem, 55vw);
}

.community-search svg {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    color: var(--brand-800);
    pointer-events: none;
}

.community-search__input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0 0.9rem 0 2.4rem;
    border: 1px solid var(--brand-200);
    border-radius: 9999px;
    background: var(--white, #fff);
    font: inherit;
    font-size: 0.95rem;
    color: var(--brand-900);
}

.community-search__input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px var(--kr-accent-ring);
}

@media (min-width: 560px) {
    .community-search {
        width: min(15rem, 40vw);
    }
}

.community-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    margin-bottom: 1.25rem;
}

.community-filters::-webkit-scrollbar {
    display: none;
}

.community-filter {
    flex: 0 0 auto;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--brand-200);
    border-radius: 9999px;
    background: var(--white, #fff);
    color: var(--brand-800);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.community-filter:hover {
    border-color: var(--brand-accent);
}

.community-filter.is-active {
    background: var(--brand-900);
    border-color: var(--brand-900);
    color: #fff;
}

.community-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.community-post {
    display: block;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--brand-200);
    border-radius: 1rem;
    background: var(--white, #fff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.community-post:hover {
    border-color: var(--brand-accent);
    box-shadow: var(--kr-shadow-md);
}

.community-post__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.community-post__cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: var(--kr-accent-soft);
    color: var(--brand-accent-hover);
}

.community-post__cat--bugs {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.community-post__cat--lounge {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.community-post__pin {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-accent-hover);
}

.community-post__time {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--brand-800);
}

.community-post__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--brand-900);
}

.community-post__excerpt {
    margin: 0 0 0.6rem;
    font-size: 0.925rem;
    line-height: 1.5;
    color: var(--brand-800);
}

.community-post__media {
    margin: 0 0 0.6rem;
    border-radius: 0.75rem;
    overflow: hidden;
    max-height: 15rem;
}

.community-post__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-post__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--brand-800);
}

.community-post__author {
    font-weight: 600;
    color: var(--brand-900);
}

.community-feed__status {
    min-height: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.community-feed__empty,
.community-feed__error,
.community-feed__end {
    margin: 1.5rem 0;
    color: var(--brand-800);
    font-size: 0.95rem;
}

.community-feed__retry {
    margin-left: 0.35rem;
    border: none;
    background: none;
    color: var(--brand-accent-hover);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.community-feed__spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--brand-200);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: community-spin 0.7s linear infinite;
}

@keyframes community-spin {
    to { transform: rotate(360deg); }
}

.community-feed__sentinel {
    height: 1px;
}

/* Skeleton loading cards */
.community-post--skeleton {
    pointer-events: none;
}

.community-post--skeleton .sk {
    background: linear-gradient(90deg, var(--brand-100) 25%, var(--brand-50) 37%, var(--brand-100) 63%);
    background-size: 400% 100%;
    animation: community-shimmer 1.4s ease infinite;
    border-radius: 0.4rem;
}

.sk--pill { width: 4rem; height: 1rem; margin-bottom: 0.6rem; border-radius: 9999px; }
.sk--title { width: 70%; height: 1.1rem; margin-bottom: 0.6rem; }
.sk--line { width: 100%; height: 0.8rem; margin-bottom: 0.4rem; }
.sk--short { width: 45%; }

@keyframes community-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.community-about {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--brand-200);
}

/* Post detail (/community/post/:id/) */
.community-post-page {
    max-width: 44rem;
}

.community-post__back {
    display: inline-flex;
    align-items: center;
    margin: 0.25rem 0 1.25rem;
    color: var(--brand-800);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.community-post__back:hover {
    color: var(--brand-accent-hover);
}

.community-post-full {
    padding: 1.5rem;
    border: 1px solid var(--brand-200);
    border-radius: 1.1rem;
    background: var(--white, #fff);
}

.community-post-full__title {
    margin: 0.5rem 0 0.35rem;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--brand-900);
}

.community-post-full__author {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-900);
}

.community-post-full__body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--brand-900);
    white-space: normal;
    word-break: break-word;
}

.community-post-full__media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.community-post-full__media img {
    width: 100%;
    border-radius: 0.75rem;
    object-fit: cover;
}

.community-post-full__actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--brand-100);
}

.community-share {
    padding: 0.5rem 1rem;
    border: 1px solid var(--brand-200);
    border-radius: 9999px;
    background: var(--white, #fff);
    color: var(--brand-900);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.community-share:hover {
    border-color: var(--brand-accent);
    background: var(--brand-50);
}

.community-replies {
    margin-top: 1.75rem;
}

.community-replies__heading {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-900);
}

.community-replies__list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.community-reply {
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--brand-200);
    border-radius: 0.9rem;
    background: var(--white, #fff);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.community-reply--highlight {
    border-color: var(--brand-accent);
    background: var(--kr-accent-soft);
}

.community-reply__head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.community-reply__author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-900);
}

.community-reply__time {
    font-size: 0.78rem;
    color: var(--brand-800);
}

.community-reply__body {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--brand-900);
    word-break: break-word;
}

.community-replies__empty {
    color: var(--brand-800);
    font-size: 0.95rem;
}

/* @mentions */
.community-mention {
    color: var(--brand-accent-hover);
    font-weight: 700;
}

/* Rental / listing unfurl card */
.community-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0.75rem 0 0.25rem;
    border: 1px solid var(--brand-200);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-card:hover {
    border-color: var(--brand-accent);
    box-shadow: var(--kr-shadow-md);
}

.community-card__img {
    flex: 0 0 5.5rem;
    display: block;
}

.community-card__img img {
    width: 5.5rem;
    height: 100%;
    min-height: 4.5rem;
    object-fit: cover;
    display: block;
}

.community-card__info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.6rem 0.85rem;
    min-width: 0;
}

.community-card__title {
    font-weight: 700;
    color: var(--brand-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-card__meta {
    font-size: 0.85rem;
    color: var(--brand-800);
}

.community-card__cta {
    flex: 0 0 auto;
    align-self: center;
    margin-right: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    background: var(--brand-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Reply composer */
.community-replybox {
    position: relative;
    margin-top: 1.25rem;
}

.community-replybox__foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.6rem;
}

.community-mention-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2.5rem);
    z-index: 30;
    max-height: 14rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--brand-200);
    border-radius: 0.7rem;
    box-shadow: var(--kr-shadow-md);
}

.community-mention-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: none;
    background: none;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.community-mention-item.is-active,
.community-mention-item:hover {
    background: var(--brand-50);
}

.community-mention-item__handle {
    font-weight: 700;
    color: var(--brand-accent-hover);
}

.community-mention-item__name {
    font-size: 0.85rem;
    color: var(--brand-800);
}
