.rf-forum-detail-page {
    --rf-forum-ink: #171717;
    --rf-forum-muted: #6b6b6b;
    --rf-forum-line: #dedede;
    --rf-forum-orange: #ff8200;
    background: #f4f4f4;
    color: var(--rf-forum-ink);
    min-height: 70vh;
    padding: 42px 24px 96px;
}

.rf-forum-detail-container {
    margin: 0 auto;
    max-width: 1180px;
}

.rf-forum-breadcrumb {
    align-items: center;
    color: var(--rf-forum-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 10px;
    margin-bottom: 24px;
}

.rf-forum-breadcrumb a { color: var(--rf-forum-ink); }
.rf-forum-breadcrumb a:hover,
.rf-forum-breadcrumb a:focus-visible { color: var(--rf-forum-orange); }

.rf-forum-detail-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 250px;
}

.rf-forum-article,
.rf-forum-author-card,
.rf-forum-replies {
    background: #fff;
    border: 1px solid var(--rf-forum-line);
    border-radius: 22px;
}

.rf-forum-article { overflow: hidden; }
.rf-forum-article-header { padding: 54px 64px 38px; }

.rf-forum-category {
    color: var(--rf-forum-orange);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.rf-forum-article h1 {
    font-size: clamp(32px, 4.2vw, 54px);
    letter-spacing: -.035em;
    line-height: 1.14;
    margin: 15px 0 18px;
}

.rf-forum-lead {
    color: #555;
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
}

.rf-forum-author-line {
    align-items: center;
    border-top: 1px solid var(--rf-forum-line);
    display: flex;
    gap: 12px;
    margin-top: 34px;
    padding-top: 24px;
}

.rf-forum-author-line > span:last-child { display: grid; gap: 2px; }
.rf-forum-author-line strong { font-size: 15px; }
.rf-forum-author-line small { color: var(--rf-forum-muted); font-size: 13px; }

.rf-forum-author-avatar,
.rf-forum-reply-avatar > span {
    align-items: center;
    background: var(--rf-forum-ink);
    border: 2px solid var(--rf-forum-orange);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.rf-forum-topic-stats {
    display: flex;
    gap: 34px;
    margin: 25px 0 0 58px;
}

.rf-forum-topic-stats div { align-items: baseline; display: flex; gap: 6px; }
.rf-forum-topic-stats dt { font-size: 18px; font-weight: 800; }
.rf-forum-topic-stats dd { color: var(--rf-forum-muted); font-size: 12px; margin: 0; }

.rf-forum-article-body {
    border-top: 1px solid var(--rf-forum-line);
    font-size: 17px;
    line-height: 1.95;
    padding: 48px 64px 58px;
}

.rf-forum-article-body h2 {
    font-size: 28px;
    line-height: 1.35;
    margin: 42px 0 16px;
}

.rf-forum-article-body h2:first-child { margin-top: 0; }
.rf-forum-article-body h3 { font-size: 21px; margin: 30px 0 12px; }
.rf-forum-article-body p { color: #3e3e3e; margin: 0 0 20px; }
.rf-forum-article-body ul,
.rf-forum-article-body ol { color: #3e3e3e; margin: 0 0 24px; padding-left: 1.5em; }
.rf-forum-article-body li { margin: 7px 0; }
.rf-forum-article-body blockquote {
    background: #f7f7f7;
    border-left: 4px solid var(--rf-forum-orange);
    margin: 30px 0;
    padding: 20px 24px;
}

.rf-forum-source {
    align-items: center;
    background: #191919;
    color: #fff;
    display: grid;
    gap: 20px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 34px 34px;
    padding: 24px 30px;
    border-radius: 16px;
}

.rf-forum-source > span { color: var(--rf-forum-orange); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.rf-forum-source strong { font-size: 16px; }
.rf-forum-source p { color: #aaa; font-size: 12px; margin: 5px 0 0; }
.rf-forum-source a { border: 1px solid #777; border-radius: 999px; color: #fff; padding: 10px 16px; white-space: nowrap; }
.rf-forum-source a:hover,
.rf-forum-source a:focus-visible { border-color: var(--rf-forum-orange); color: var(--rf-forum-orange); }

.rf-forum-author-card {
    padding: 32px 24px;
    position: sticky;
    text-align: center;
    top: 96px;
}

.rf-forum-author-avatar-large { font-size: 24px; height: 76px; margin: 0 auto 18px; width: 76px; }
.rf-forum-author-card h2 { font-size: 20px; margin: 0 0 5px; }
.rf-forum-author-card p { color: var(--rf-forum-muted); margin: 0 0 15px; }
.rf-forum-official-badge { background: #fff1e3; border-radius: 999px; color: #bd5e00; display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 11px; }
.rf-forum-author-card > a { border-top: 1px solid var(--rf-forum-line); color: var(--rf-forum-ink); display: block; margin-top: 24px; padding-top: 20px; }
.rf-forum-author-card > a:hover,
.rf-forum-author-card > a:focus-visible { color: var(--rf-forum-orange); }

.rf-forum-replies { margin-top: 24px; padding: 46px 64px 56px; }
.rf-forum-replies > header { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 28px; }
.rf-forum-replies h2 { font-size: 30px; margin: 8px 0 0; }

.rf-forum-reply-form {
    background: #f7f7f7;
    border: 1px solid var(--rf-forum-line);
    border-radius: 15px;
    margin-bottom: 34px;
    padding: 22px;
}

.rf-forum-reply-form label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.rf-forum-reply-form textarea { background: #fff; border: 1px solid #ccc; border-radius: 10px; box-sizing: border-box; font-size: 15px; line-height: 1.6; min-height: 130px; padding: 14px 16px; resize: vertical; width: 100%; }
.rf-forum-reply-form textarea:focus { border-color: var(--rf-forum-orange); box-shadow: 0 0 0 3px rgba(255,130,0,.14); outline: 0; }
.rf-forum-reply-form > div { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-top: 14px; }
.rf-forum-reply-form small { color: var(--rf-forum-muted); }
.rf-forum-reply-form button,
.rf-forum-login-prompt a { background: var(--rf-forum-orange); border: 0; border-radius: 999px; color: #111; font-weight: 800; padding: 12px 24px; }

.rf-forum-login-prompt {
    align-items: center;
    background: #171717;
    border-radius: 15px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 34px;
    padding: 24px 28px;
}

.rf-forum-login-prompt strong { font-size: 18px; }
.rf-forum-login-prompt p { color: #aaa; margin: 6px 0 0; }
.rf-forum-login-prompt a { white-space: nowrap; }

.rf-forum-reply { border-top: 1px solid var(--rf-forum-line); display: grid; gap: 15px; grid-template-columns: 48px minmax(0, 1fr); padding: 26px 0; }
.rf-forum-reply-avatar img { border: 1px solid var(--rf-forum-line); border-radius: 50%; height: 46px; object-fit: cover; width: 46px; }
.rf-forum-reply header { align-items: baseline; display: flex; flex-wrap: wrap; gap: 10px; }
.rf-forum-reply header span { color: var(--rf-forum-muted); font-size: 12px; }
.rf-forum-reply p { color: #3e3e3e; line-height: 1.8; margin: 10px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rf-forum-reply-empty { border-top: 1px solid var(--rf-forum-line); color: var(--rf-forum-muted); padding: 42px 10px 12px; text-align: center; }
.rf-forum-reply-empty > span { color: var(--rf-forum-orange); display: block; font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.rf-forum-reply-empty strong { color: var(--rf-forum-ink); font-size: 18px; }
.rf-forum-reply-empty p { margin: 5px 0 0; }

@media (max-width: 980px) {
    .rf-forum-detail-layout { grid-template-columns: 1fr; }
    .rf-forum-author-card { display: none; }
}

@media (max-width: 640px) {
    .rf-forum-detail-page { padding: 25px 14px 60px; }
    .rf-forum-article,
    .rf-forum-replies { border-radius: 15px; }
    .rf-forum-article-header { padding: 34px 23px 27px; }
    .rf-forum-article h1 { font-size: 30px; }
    .rf-forum-lead { font-size: 16px; }
    .rf-forum-topic-stats { margin-left: 0; }
    .rf-forum-article-body { font-size: 16px; padding: 34px 23px 38px; }
    .rf-forum-article-body h2 { font-size: 23px; }
    .rf-forum-source { align-items: start; grid-template-columns: 1fr; margin: 0 14px 14px; padding: 22px; }
    .rf-forum-source a { text-align: center; }
    .rf-forum-replies { padding: 34px 22px 40px; }
    .rf-forum-reply-form > div,
    .rf-forum-login-prompt { align-items: stretch; flex-direction: column; }
    .rf-forum-reply-form button,
    .rf-forum-login-prompt a { text-align: center; width: 100%; }
}
