/* ============================================================
   Make Capitalism Behave — Base Styles
   A clean, forum-focused design. No distractions.
   ============================================================ */

:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --border: #e0e0e0;
    --text: #1a1a1b;
    --text-muted: #878a8c;
    --accent: #e63946;
    --accent-hover: #c1121f;
    --link: #0079d3;
    --radius: 4px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.mcb-layout { display: flex; flex-direction: column; min-height: 100vh; }
.mcb-main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 20px 16px; width: 100%; }

/* ── Header ── */
.mcb-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.mcb-header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; gap: 16px;
}
.mcb-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 16px; }
.mcb-logo:hover { text-decoration: none; }
.mcb-nav { display: flex; align-items: center; gap: 16px; }
.mcb-nav a { color: var(--text-muted); font-size: 14px; }
.mcb-nav a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ── */
.mcb-btn-primary {
    background: var(--accent); color: white; border: none;
    padding: 6px 14px; border-radius: var(--radius);
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.mcb-btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: white; }
.mcb-btn-secondary {
    border: 1px solid rgba(255,255,255,0.6); color: #ffffff;
    padding: 6px 14px; border-radius: var(--radius); font-size: 13px;
    background: transparent; cursor: pointer;
}
.mcb-btn-secondary:hover { border-color: #fff; text-decoration: none; color: #fff; }

/* ── Hero ── */
.mcb-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white; padding: 60px 16px; text-align: center;
    border-radius: 8px; margin-bottom: 24px;
}
.mcb-hero-title { font-size: clamp(24px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; }
.mcb-hero-sub { font-size: 16px; opacity: 0.8; max-width: 600px; margin: 0 auto 28px; }
.mcb-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Category chips ── */
.mcb-categories-strip { margin-bottom: 20px; }
.mcb-categories-inner { display: flex; gap: 8px; flex-wrap: wrap; }
.mcb-cat-chip {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 4px 12px; font-size: 13px;
    display: flex; align-items: center; gap: 4px; color: var(--text);
}
.mcb-cat-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Posts ── */
.mcb-posts-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mcb-post-list { display: flex; flex-direction: column; gap: 8px; }
.mcb-post-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px;
    display: flex; gap: 12px; align-items: flex-start;
    transition: border-color 0.1s;
}
.mcb-post-card:hover { border-color: #c8c8c8; }
.mcb-post-vote { min-width: 32px; text-align: center; }
.mcb-score { font-weight: 700; font-size: 13px; color: var(--text-muted); }
.mcb-score.positive { color: #ff4500; }
.mcb-score.negative { color: #7193ff; }
.mcb-post-body { flex: 1; }
.mcb-post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.mcb-post-cat { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.mcb-post-cat:hover { color: var(--accent); text-decoration: none; }
.mcb-post-author, .mcb-post-time { font-size: 12px; color: var(--text-muted); }
.mcb-post-title a { color: var(--text); font-size: 16px; font-weight: 600; }
.mcb-post-title a:hover { color: var(--link); text-decoration: none; }
.mcb-post-footer { margin-top: 6px; }
.mcb-comment-count { font-size: 12px; color: var(--text-muted); }

/* ── Forum layout ── */
.mcb-forum { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
@media (max-width: 768px) { .mcb-forum { grid-template-columns: 1fr; } }
.mcb-cat-list { display: flex; flex-direction: column; gap: 2px; }
.mcb-cat-list a {
    padding: 6px 10px; border-radius: var(--radius);
    color: var(--text); font-size: 14px;
}
.mcb-cat-list a:hover { background: var(--bg); text-decoration: none; }
.mcb-cat-list a.active { background: var(--bg); font-weight: 700; color: var(--accent); }

/* ── Honeypot — visually hidden but NOT display:none ── */
.mcb-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
    tabindex: -1;
}

/* ── Comments ── */
.mcb-comment {
    background: var(--surface); border-left: 2px solid var(--border);
    padding: 10px 12px; margin-bottom: 8px; border-radius: 0 var(--radius) var(--radius) 0;
}
.mcb-comment-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.mcb-comment-meta strong { color: var(--text); }
.mcb-comment-body { font-size: 14px; margin-bottom: 8px; }
.mcb-comment-actions { display: flex; gap: 8px; }
.mcb-comment-actions button { background: none; border: none; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.mcb-comment-actions button:hover { color: var(--text); }

/* ── Footer ── */
.mcb-footer { border-top: 1px solid var(--border); padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* ── Submit post page ── */
.mcb-submit-page {
    display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start;
}
@media (max-width: 768px) { .mcb-submit-page { grid-template-columns: 1fr; } }
.mcb-submit-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 24px;
}
.mcb-submit-card h1 { font-size: 20px; margin-bottom: 4px; }
.mcb-submit-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.mcb-submit-sidebar { display: flex; flex-direction: column; gap: 12px; }
.mcb-sidebar-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px;
}
.mcb-sidebar-card h3 { font-size: 14px; margin-bottom: 8px; }
.mcb-sidebar-card ul { padding-left: 16px; font-size: 13px; color: var(--text-muted); }
.mcb-sidebar-card li { margin-bottom: 6px; }
.mcb-sidebar-card p { font-size: 13px; color: var(--text-muted); }

/* Category picker */
.mcb-cat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mcb-cat-option {
    border: 1px solid var(--border); background: var(--bg);
    border-radius: 20px; padding: 5px 14px; cursor: pointer;
    font-size: 13px; display: flex; gap: 4px; align-items: center;
    transition: all 0.1s;
}
.mcb-cat-option:hover { border-color: var(--accent); }
.mcb-cat-option.selected { border-color: var(--accent); background: var(--accent); color: white; }

/* Char count */
.mcb-char-count { font-size: 11px; color: var(--text-muted); font-weight: normal; }
.mcb-char-count.over { color: var(--accent); }

/* Preview */
.mcb-preview {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.mcb-preview-header {
    background: var(--bg); padding: 8px 12px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.mcb-preview-body { padding: 12px; font-size: 14px; white-space: pre-wrap; }

.mcb-submit-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.mcb-btn-submit-inline { padding: 8px 24px; }

/* ── Voting ── */
.mcb-vote-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 16px; padding: 2px 4px;
    border-radius: var(--radius); transition: color 0.1s;
}
.mcb-vote-btn:hover { color: var(--text); }
.mcb-vote-btn.voted-up { color: #ff4500; }
.mcb-vote-btn.voted-down { color: #7193ff; }

.mcb-vote-btn-sm {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 12px; padding: 1px 3px;
}
.mcb-vote-btn-sm.voted-up { color: #ff4500; }
.mcb-vote-btn-sm.voted-down { color: #7193ff; }

/* Post detail */
.mcb-post-full {
    display: flex; gap: 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px; padding: 20px;
    margin-bottom: 16px;
}
.mcb-post-vote-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 32px; }
.mcb-post-content { flex: 1; }
.mcb-post-body-text { margin-top: 12px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.mcb-edited { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* Comment form */
.mcb-comment-form-section { margin-bottom: 24px; }
.mcb-comment-form-section h3 { font-size: 16px; margin-bottom: 12px; }
.mcb-comment-form textarea {
    width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 12px; font-size: 14px; background: var(--bg); resize: vertical;
    font-family: var(--font);
}
.mcb-comment-form textarea:focus { outline: none; border-color: var(--link); background: var(--surface); }
.mcb-comment-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.mcb-comment-form-footer button {
    background: var(--accent); color: white; border: none; padding: 7px 16px;
    border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 600;
}
.mcb-comment-form-footer button:disabled { opacity: 0.6; }
.mcb-login-prompt { font-size: 14px; color: var(--text-muted); padding: 12px 0; }

/* Comment thread */
.mcb-comment {
    display: flex; gap: 8px;
    padding: 10px 0; border-top: 1px solid var(--border);
}
.mcb-comment-vote { display: flex; flex-direction: column; align-items: center; min-width: 24px; gap: 2px; }
.mcb-comment-score { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.mcb-comment-body-col { flex: 1; }
.mcb-comment-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; margin-bottom: 5px; }
.mcb-comment-meta strong { color: var(--text); }
.mcb-comment-body { font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.mcb-comment-actions { display: flex; gap: 8px; }
.mcb-reply-form { margin-top: 8px; }
.mcb-reply-form textarea {
    width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 10px; font-size: 13px; background: var(--bg); resize: vertical;
    font-family: var(--font);
}
.mcb-reply-actions { display: flex; gap: 8px; margin-top: 6px; }
.mcb-reply-actions button {
    border: 1px solid var(--border); background: var(--bg);
    padding: 5px 12px; border-radius: var(--radius); cursor: pointer; font-size: 12px;
}
.mcb-reply-actions button:first-child { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Auth pages ── */
.mcb-auth-page {
    display: flex; justify-content: center; align-items: flex-start;
    padding: 40px 16px; min-height: 70vh;
}
.mcb-auth-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 32px; width: 100%; max-width: 420px;
}
.mcb-auth-header { text-align: center; margin-bottom: 28px; }
.mcb-auth-logo { font-size: 32px; display: block; margin-bottom: 12px; text-decoration: none; }
.mcb-auth-header h1 { font-size: 22px; margin-bottom: 6px; }
.mcb-auth-header p { font-size: 13px; color: var(--text-muted); }

.mcb-form { display: flex; flex-direction: column; gap: 18px; }

.mcb-field { display: flex; flex-direction: column; gap: 4px; }
.mcb-field label {
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; justify-content: space-between; align-items: center;
}
.mcb-field input[type="text"],
.mcb-field input[type="email"],
.mcb-field input[type="password"] {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 9px 12px; font-size: 14px; width: 100%;
    background: var(--bg); transition: border-color 0.15s;
}
.mcb-field input:focus {
    outline: none; border-color: var(--link);
    background: var(--surface);
}
.mcb-field-error input { border-color: var(--accent); }
.mcb-field-hint { font-size: 12px; color: var(--text-muted); }
.mcb-field-hint-error { color: var(--accent); font-weight: 600; }

.mcb-field-inline { flex-direction: row; align-items: center; gap: 8px; }
.mcb-field-inline input[type="checkbox"] { width: auto; }
.mcb-field-inline label { font-weight: normal; }

.mcb-forgot-link { font-size: 12px; font-weight: normal; color: var(--link); }

/* Password strength bar */
.mcb-password-strength {
    height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 4px;
}
.mcb-strength-bar { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }

.mcb-btn-submit {
    background: var(--accent); color: white; border: none;
    padding: 10px 0; border-radius: var(--radius);
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background 0.15s;
}
.mcb-btn-submit:hover:not(:disabled) { background: var(--accent-hover); }
.mcb-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.mcb-auth-terms { font-size: 12px; color: var(--text-muted); text-align: center; }

.mcb-alert {
    border-radius: var(--radius); padding: 12px 14px;
    font-size: 13px; margin-bottom: 8px;
}
.mcb-alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.mcb-alert-error   { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.mcb-alert-warning { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }

.mcb-link-btn {
    background: none; border: none; color: var(--link);
    cursor: pointer; font-size: inherit; padding: 0;
    text-decoration: underline;
}

/* ── Misc ── */
.mcb-loading, .mcb-empty { padding: 32px; text-align: center; color: var(--text-muted); }
.mcb-sort-tabs { display: flex; gap: 4px; }
.mcb-sort-tabs button { background: none; border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; cursor: pointer; font-size: 13px; }
.mcb-sort-tabs button.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Dust banner ── */
.mcb-dust-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}
