.rf-forum { --rf-surface: var(--dash-mode-surface, #fff); --rf-surface-alt: var(--dash-mode-surface-alt, #f8fafc); --rf-text: var(--dash-mode-text, #1f2937); --rf-muted: var(--dash-mode-muted, #6b7280); --rf-border: var(--dash-mode-border, #e4e7eb); --rf-link: var(--dash-mode-link, #2271b1); color: var(--rf-text); max-width: 860px; margin: 0 auto; font-family: var(--rev-font, inherit); }
.rf-forum .rf-title { margin: 16px 0 12px; }
.rf-notice { background: var(--rf-surface-alt, #eef7ff); color: var(--rf-text, #1f2937); border-left: 4px solid #2271b1; padding: 10px 14px; margin: 12px 0; }
.rf-board-list, .rf-thread-list { list-style: none; padding: 0; margin: 0; }
.rf-board, .rf-thread-row { padding: 12px 14px; border: 1px solid var(--rf-border, #e4e7eb); border-bottom: none; background: var(--rf-surface, #fff); }
.rf-board:last-child, .rf-thread-row:last-child { border-bottom: 1px solid var(--rf-border, #e4e7eb); }
.rf-board-name { color: var(--rf-link, #2271b1); font-weight: 600; text-decoration: none; font-size: 1.05em; }
.rf-forum .rf-nav-links a, .rf-forum .rf-user-link, .rf-forum .rf-search-title a { color: var(--rf-link, #2271b1); }
.rf-board-desc { color: var(--rf-muted, #6b7280); font-size: 0.9em; margin-top: 4px; }
.rf-meta { color: var(--rf-muted, #6b7280); font-size: 0.85em; margin-left: 6px; }
.rf-badge { display: inline-block; font-size: 0.7em; padding: 2px 6px; border-radius: 3px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.05em; }
.rf-badge-pinned { background: #fef3c7; color: #92400e; }
.rf-badge-locked { background: #fee2e2; color: #991b1b; }
.rf-post { display: flex; gap: 12px; border: 1px solid var(--rf-border, #e4e7eb); background: var(--rf-surface, #fff); padding: 14px 16px; margin: 10px 0; border-radius: 4px; }
.rf-post.rf-op { border-left: 4px solid #2271b1; }
.rf-post-main { flex: 1; min-width: 0; }
.rf-post-meta { font-size: 0.85em; color: var(--rf-muted, #6b7280); margin-bottom: 6px; }
.rf-post-body { line-height: 1.5; }
.rf-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 36px; user-select: none; }
.rf-vote-form { margin: 0; padding: 0; background: none; border: none; }
.rf-vote-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 3px; color: var(--rf-muted, #6b7280); font-size: 14px; line-height: 1; cursor: pointer; }
button.rf-vote-button:hover { color: #2271b1; background: #eff6ff; border-color: #bfdbfe; }
button.rf-vote-down:hover { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.rf-vote-active { color: #fff; }
.rf-vote-up.rf-vote-active, button.rf-vote-up.rf-vote-active:hover { background: #2271b1; border-color: #2271b1; color: #fff; }
.rf-vote-down.rf-vote-active, button.rf-vote-down.rf-vote-active:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.rf-vote-disabled { cursor: not-allowed; color: #d1d5db; }
.rf-vote-score { font-weight: 600; font-size: 0.95em; color: var(--rf-text, #4b5563); min-width: 28px; text-align: center; padding: 2px 0; }
.rf-vote-score-pos { color: var(--rf-text, #15803d); }
.rf-vote-score-neg { color: var(--rf-text, #b91c1c); }
.rf-form { margin-top: 24px; padding: 16px; background: var(--rf-surface-alt, #f8fafc); border: 1px solid var(--rf-border, #e4e7eb); border-radius: 4px; }
.rf-form input[type=text], .rf-form textarea { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid #d1d5db; border-radius: 3px; }
.rf-button { background: var(--rev-btn-bg, #2271b1); color: var(--rev-btn-color, #fff); border: var(--rev-btn-border, none); padding: var(--rev-btn-padding, 8px 18px); border-radius: var(--rev-btn-radius, 3px); cursor: pointer; font-size: var(--rev-btn-font-size, 14px); font-weight: var(--rev-btn-font-weight, 400); box-shadow: var(--rev-btn-shadow, none); transition: var(--rev-btn-transition, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease); }
.rf-button:hover { background: var(--rev-btn-bg-hover, #135e96); box-shadow: var(--rev-btn-shadow-hover, var(--rev-btn-shadow, none)); transform: translateY(var(--rev-btn-lift, 0)); }
.rf-locked-notice, .rf-login-prompt { margin-top: 16px; padding: 10px 14px; background: var(--rf-surface-alt, #f3f4f6); border-radius: 3px; }
.rf-user-link { color: #2271b1; text-decoration: none; font-weight: 500; }
.rf-user-link:hover { text-decoration: underline; }
.rf-post-avatar img { vertical-align: middle; border-radius: 50%; margin-right: 4px; }
.rf-profile-header { display: flex; gap: 18px; align-items: center; padding: 18px; background: var(--rf-surface, #fff); border: 1px solid var(--rf-border, #e4e7eb); border-radius: 4px; margin-bottom: 18px; }
.rf-profile-avatar img { border-radius: 50%; }
.rf-profile-name { margin: 0 0 4px; }
.rf-profile-meta { margin: 0 0 8px; color: var(--rf-muted, #6b7280); font-size: 0.9em; }
.rf-profile-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.rf-profile-stats li { font-size: 0.9em; color: var(--rf-muted, #6b7280); }
.rf-profile-stats strong { color: var(--rf-text, #111827); font-size: 1.05em; }
.rf-profile-section { margin-top: 22px; }
.rf-reply-list { list-style: none; padding: 0; margin: 0; }
.rf-reply-row { padding: 12px 14px; border: 1px solid var(--rf-border, #e4e7eb); border-bottom: none; background: var(--rf-surface, #fff); }
.rf-reply-row:last-child { border-bottom: 1px solid var(--rf-border, #e4e7eb); }
.rf-reply-excerpt { color: var(--rf-text, #4b5563); font-size: 0.9em; margin: 4px 0; }
.rf-nav { display: flex; gap: 16px; padding: 10px 14px; background: var(--rf-surface-alt, #f8fafc); border: 1px solid var(--rf-border, #e4e7eb); border-radius: 4px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.rf-nav-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.rf-nav a { text-decoration: none; color: #2271b1; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.rf-nav a:hover { text-decoration: underline; }
.rf-search-form { display: flex; gap: 6px; margin-left: auto; }
.rf-search-input { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 3px; min-width: 200px; font-size: 14px; }
.rf-search-button { background: var(--rev-btn-bg, #2271b1); color: var(--rev-btn-color, #fff); border: none; padding: 6px 14px; border-radius: var(--rev-btn-radius, 3px); cursor: pointer; font-size: 13px; font-family: var(--rev-btn-font-family, inherit); text-transform: var(--rev-btn-text-transform, none); }
.rf-search-button:hover { background: var(--rev-btn-bg-hover, #135e96); color: var(--rev-btn-color-hover, #fff); }
.rf-search-meta { color: var(--rf-muted, #6b7280); margin: 4px 0 14px; }
.rf-search-results { list-style: none; padding: 0; margin: 0; }
.rf-search-result { padding: 12px 14px; border: 1px solid var(--rf-border, #e4e7eb); border-bottom: none; background: var(--rf-surface, #fff); }
.rf-search-result:last-child { border-bottom: 1px solid var(--rf-border, #e4e7eb); }
.rf-search-title a { font-weight: 600; font-size: 1.05em; text-decoration: none; color: #2271b1; }
.rf-search-title a:hover { text-decoration: underline; }
.rf-search-meta-line { color: var(--rf-muted, #6b7280); font-size: 0.85em; margin: 4px 0; }
.rf-search-excerpt { color: var(--rf-text, #4b5563); font-size: 0.9em; line-height: 1.4; }
.rf-highlight { background: #fef08a; color: #1f2937; padding: 0 2px; border-radius: 2px; }
.rf-unread-badge { display: inline-block; background: #dc2626; color: #fff; font-size: 0.75em; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.rf-profile-actions { margin-top: 8px; }
.rf-button-small { padding: 4px 12px; font-size: 13px; display: inline-block; text-decoration: none; }
.rf-button-small:hover { color: #fff; }
.rf-conversation-list { list-style: none; padding: 0; margin: 0; }
.rf-conversation-row { border: 1px solid var(--rf-border, #e4e7eb); border-bottom: none; background: var(--rf-surface, #fff); }
.rf-conversation-row:last-child { border-bottom: 1px solid var(--rf-border, #e4e7eb); }
.rf-conversation-row.rf-conversation-unread { background: var(--rf-surface-alt, #f0f9ff); }
.rf-conversation-link { display: flex; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; align-items: flex-start; }
.rf-conversation-link:hover { background: var(--rf-surface-alt, #f3f4f6); }
.rf-conversation-avatar img { border-radius: 50%; }
.rf-conversation-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rf-conversation-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rf-conversation-excerpt { color: var(--rf-text, #4b5563); font-size: 0.9em; }
.rf-message-list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.rf-message { padding: 10px 14px; border-radius: 8px; max-width: 75%; }
.rf-message-mine { align-self: flex-end; background: var(--rf-surface-alt, #dbeafe); border: 1px solid var(--rf-border, #bfdbfe); }
.rf-message-theirs { align-self: flex-start; background: var(--rf-surface-alt, #f3f4f6); }
.rf-message-meta { font-size: 0.75em; color: var(--rf-muted, #6b7280); margin-bottom: 4px; }
.rf-message-body { line-height: 1.4; }
.rf-message-body p:last-child { margin-bottom: 0; }
.rf-notification-list { list-style: none; padding: 0; margin: 0; }
.rf-notification { border: 1px solid var(--rf-border, #e4e7eb); border-bottom: none; background: var(--rf-surface, #fff); }
.rf-notification:last-child { border-bottom: 1px solid var(--rf-border, #e4e7eb); }
.rf-notification.rf-notification-unread { background: var(--rf-surface-alt, #fef9e7); border-left: 3px solid #f59e0b; }
.rf-notification-link { display: flex; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; align-items: center; }
.rf-notification-link:hover { background: var(--rf-surface-alt, #f3f4f6); }
.rf-notification-avatar img { border-radius: 50%; }
.rf-notification-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rf-notification-text { line-height: 1.4; }
.rf-post:target { box-shadow: 0 0 0 3px #fde68a; }
.rf-mention { display: inline-block; padding: 0 4px; background: #eef2ff; color: #3730a3; border-radius: 3px; text-decoration: none; font-weight: 500; }
.rf-mention:hover { background: #c7d2fe; text-decoration: none; }
.rf-edited { font-size: 0.85em; color: var(--rf-muted, #6b7280); font-style: italic; cursor: help; }
.rf-post-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.rf-post-action-form { margin: 0; display: inline; }
.rf-post-action { font-size: 0.8em; color: var(--rf-muted, #6b7280); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; }
.rf-post-action:hover { color: var(--rf-text, #111827); text-decoration: underline; }
.rf-post-delete:hover { color: var(--rf-text, #b91c1c); }
.rf-edit-form { margin-top: 10px; }
.rf-button-secondary { background: var(--rf-surface-alt, #e5e7eb); color: var(--rf-text, #111827); border: 1px solid var(--rf-border, #d1d5db); }
.rf-button-secondary:hover { background: var(--rf-surface, #fff); color: var(--rf-text, #111827); }
.rf-pagination { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 16px 0; }
.rf-page-link { display: inline-block; min-width: 32px; text-align: center; padding: 4px 8px; border: 1px solid var(--rf-border, #e4e7eb); border-radius: 4px; text-decoration: none; color: var(--rf-text, #374151); }
.rf-page-link:hover { background: var(--rf-surface-alt, #f3f4f6); }
.rf-page-current { background: #111827; color: #fff; border-color: var(--rf-text, #111827); font-weight: 600; }
.rf-page-gap { padding: 4px 2px; color: var(--rf-muted, #6b7280); }

/* Honeypot: off-screen rather than display:none, since some bots skip fields
   that are explicitly hidden. */
.rf-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Notification settings */
.rf-settings-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rf-settings-table th, .rf-settings-table td { padding: 8px 10px; border-bottom: 1px solid var(--rf-border, #e4e7eb); text-align: left; }
.rf-settings-table thead th { font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.03em; color: var(--rf-muted, #6b7280); }
.rf-settings-table tbody th { font-weight: 500; }
.rf-settings-table td { width: 100px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Pair controls and link states with the same palette as their containers. */
.rf-forum .rf-page-link, .rf-forum .rf-conversation-link, .rf-forum .rf-notification-link { color: var(--rf-text, #1f2937); }
.rf-forum .rf-page-current, .rf-forum .rf-page-current:hover { background: var(--rf-text, #111827); color: var(--rf-surface, #fff); }
.rf-forum .rf-post-action { color: var(--rf-muted, #6b7280); }
.rf-forum .rf-post-action:hover { color: var(--rf-text, #111827); }
.rf-forum .rf-mention { color: #3730a3; }
.rf-form input[type=text], .rf-form textarea, .rf-search-input { background: var(--rf-surface, #fff); color: var(--rf-text, #1f2937); border-color: var(--rf-border, #d1d5db); }
.rf-form input::placeholder, .rf-form textarea::placeholder, .rf-search-input::placeholder { color: var(--rf-muted, #6b7280); opacity: 1; }
.rf-forum .rf-button-secondary, .rf-forum .rf-button-secondary:hover { color: var(--rf-text, #111827); }

/* Standalone forum navigation and search controls retain usable touch targets. */
.rf-forum .rf-nav a, .rf-forum .rf-board-name, .rf-forum .rf-search-button { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; box-sizing: border-box; }
/* Let search fit narrow containers rather than clipping its submit button. */
.rf-forum .rf-search-form { flex: 1 1 260px; min-width: 0; max-width: 100%; }
.rf-forum .rf-search-input { flex: 1 1 0; width: 100%; min-width: 0; }
.rf-forum .rf-search-button { flex: 0 0 auto; }

/* Board access: badges on the board list, locked boards, and the locked notice. */
.rf-badge-subscribers { background: color-mix(in srgb, var(--rev-btn-bg, #2271b1) 14%, transparent); color: var(--rf-link, #2271b1); }
.rf-badge-members { background: var(--rf-surface-alt, #f3f4f6); color: var(--rf-muted, #6b7280); border: 1px solid var(--rf-border, #e4e7eb); }
.rf-lock { display: inline-block; width: 0.8em; height: 0.8em; margin-right: 4px; vertical-align: -0.05em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.rf-board--locked .rf-board-name { color: var(--rf-text, #1f2937); opacity: 0.8; }
.rf-locked { margin: 16px 0; padding: 22px 20px; text-align: center; background: var(--rf-surface-alt, #f8fafc); border: 1px dashed var(--rf-border, #e4e7eb); border-radius: 6px; }
.rf-locked-title { margin: 0 0 12px; font-weight: 600; font-size: 1.05em; }
.rf-locked-actions { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 0; }
.rf-locked .rf-button { display: inline-block; text-decoration: none; }
.rf-locked-signin { color: var(--rf-link, #2271b1); font-size: 0.92em; }
