/* =========================================================================
   Belief Corner — master stylesheet
   Modern forum chassis, classical typography.
   ========================================================================= */

/* ---------- Theme tokens ---------- */
:root {
    --bc-bg:           #FBF8F1;
    --bc-bg-elev:     #FFFFFF;
    --bc-bg-quiet:   #F4EFE2;
    --bc-bg-input:    #FFFFFF;
    --bc-border:       #E5DDC7;
    --bc-border-soft:  #EFE9D8;
    --bc-text:         #1E1B17;
    --bc-text-muted:   #6B6760;
    --bc-text-faint:   #948F84;
    --bc-link:         #1A2F4B;
    --bc-link-hover:   #2F4A6B;
    --bc-navy:         #1A2F4B;
    --bc-gold:         #8A6308;
    --bc-gold-bright:  #B8860B;
    --bc-sage:         #4E6B52;
    --bc-red:          #8B2C2C;
    --bc-shadow:       0 1px 2px rgba(30,27,23,.04), 0 4px 12px rgba(30,27,23,.04);
    --bc-shadow-lg:    0 8px 24px rgba(30,27,23,.08), 0 2px 6px rgba(30,27,23,.04);
    --bc-radius-sm:    4px;
    --bc-radius:       8px;
    --bc-radius-lg:    14px;
    --bc-radius-pill:  999px;
    --bc-content-max:  1240px;
    --bc-font-display: 'Cormorant Garamond', 'Georgia', serif;
    --bc-font-sc:      'Cormorant SC', 'Cormorant Garamond', serif;
    --bc-font-body:    'Spectral', 'Iowan Old Style', Georgia, serif;
    --bc-font-ui:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bc-font-mono:    'JetBrains Mono', ui-monospace, 'Menlo', monospace;
}

[data-theme="dark"] {
    --bc-bg:           #0F0E0C;
    --bc-bg-elev:      #17150F;
    --bc-bg-quiet:    #1D1A12;
    --bc-bg-input:     #1B1812;
    --bc-border:       #2D2A20;
    --bc-border-soft:  #221F18;
    --bc-text:         #ECE5D2;
    --bc-text-muted:   #9D978A;
    --bc-text-faint:   #6C685D;
    --bc-link:         #9CBEEA;
    --bc-link-hover:   #C1D5F0;
    --bc-navy:         #7BA5D9;
    --bc-gold:         #D4AF37;
    --bc-gold-bright:  #E5C24F;
    --bc-sage:         #8FB592;
    --bc-red:          #D88080;
    --bc-shadow:       0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    --bc-shadow-lg:    0 8px 24px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bc-bg: #0F0E0C; --bc-bg-elev: #17150F; --bc-bg-quiet: #1D1A12;
        --bc-bg-input: #1B1812; --bc-border: #2D2A20; --bc-border-soft: #221F18;
        --bc-text: #ECE5D2; --bc-text-muted: #9D978A; --bc-text-faint: #6C685D;
        --bc-link: #9CBEEA; --bc-link-hover: #C1D5F0; --bc-navy: #7BA5D9;
        --bc-gold: #D4AF37; --bc-gold-bright: #E5C24F; --bc-sage: #8FB592;
        --bc-red: #D88080;
        --bc-shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
        --bc-shadow-lg: 0 8px 24px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bc-bg);
    color: var(--bc-text);
    font-family: var(--bc-font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--bc-link); text-decoration: none; }
a:hover { color: var(--bc-link-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--bc-font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.005em; margin: 0; color: var(--bc-text); }
p { margin: 0 0 1em; }

/* ---------- Accessibility ---------- */
.bc-skiplink {
    position: absolute; left: -9999px; top: 0; padding: .75rem 1rem;
    background: var(--bc-navy); color: #fff; border-radius: 0 0 var(--bc-radius) 0;
    z-index: 1000;
}
.bc-skiplink:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--bc-gold-bright);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ---------- Header ---------- */
.bc-header {
    background: var(--bc-bg-elev);
    border-bottom: 1px solid var(--bc-border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(6px);
}
.bc-header-inner {
    max-width: var(--bc-content-max);
    margin: 0 auto;
    padding: .75rem 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.bc-brand { display: flex; align-items: center; gap: .65rem; color: var(--bc-text); }
.bc-brand:hover { text-decoration: none; }
.bc-brand-mark {
    font-family: var(--bc-font-display);
    color: var(--bc-gold-bright);
    font-size: 1.5rem;
    line-height: 1;
}
.bc-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.bc-brand-name {
    font-family: var(--bc-font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -.005em;
}
.bc-brand-tag {
    font-family: var(--bc-font-sc);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bc-text-faint);
}

.bc-nav { display: flex; gap: 1.5rem; }
.bc-nav a {
    color: var(--bc-text-muted);
    font-weight: 500;
    font-size: .94rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.bc-nav a:hover { color: var(--bc-text); border-bottom-color: var(--bc-gold-bright); text-decoration: none; }

.bc-header-actions { display: flex; align-items: center; gap: .65rem; }

.bc-iconbtn {
    background: transparent;
    border: 1px solid var(--bc-border);
    color: var(--bc-text-muted);
    width: 36px; height: 36px;
    border-radius: var(--bc-radius);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.bc-iconbtn:hover { background: var(--bc-bg-quiet); color: var(--bc-text); border-color: var(--bc-text-faint); }

.bc-userchip {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .25rem .65rem .25rem .3rem;
    background: var(--bc-bg-quiet);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-pill);
    color: var(--bc-text);
    font-size: .9rem; font-weight: 500;
}
.bc-userchip:hover { text-decoration: none; border-color: var(--bc-gold-bright); }
.bc-userchip-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bc-inline-form { display: inline; }

/* ---------- Buttons ---------- */
.bc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-radius: var(--bc-radius);
    font-family: var(--bc-font-ui);
    font-weight: 500; font-size: .92rem;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s, transform .05s;
    text-decoration: none;
    white-space: nowrap;
}
.bc-btn:hover { text-decoration: none; }
.bc-btn:active { transform: translateY(1px); }
.bc-btn-primary { background: var(--bc-navy); color: #FBF8F1; }
.bc-btn-primary:hover { background: #243f63; color: #fff; }
[data-theme="dark"] .bc-btn-primary { background: var(--bc-navy); color: #0F0E0C; }
[data-theme="dark"] .bc-btn-primary:hover { background: #B6CFEC; }
.bc-btn-ghost { background: transparent; color: var(--bc-text); border-color: var(--bc-border); }
.bc-btn-ghost:hover { background: var(--bc-bg-quiet); border-color: var(--bc-text-faint); color: var(--bc-text); }
.bc-btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.bc-btn-block { width: 100%; }
.bc-btn-gold { background: var(--bc-gold); color: #FBF8F1; }

/* ---------- Flashes ---------- */
.bc-flashes {
    max-width: var(--bc-content-max);
    margin: 1rem auto 0; padding: 0 1.25rem;
}
.bc-flash {
    padding: .75rem 1rem;
    border-radius: var(--bc-radius);
    margin-bottom: .5rem;
    font-size: .94rem;
    border: 1px solid;
}
.bc-flash-ok    { background: rgba(78, 107, 82, .1); border-color: rgba(78, 107, 82, .35); color: var(--bc-sage); }
.bc-flash-error { background: rgba(139, 44, 44, .08); border-color: rgba(139, 44, 44, .35); color: var(--bc-red); }
.bc-flash-info  { background: rgba(26, 47, 75, .08); border-color: rgba(26, 47, 75, .25); color: var(--bc-navy); }

/* ---------- Main / Page ---------- */
.bc-main { min-height: 60vh; }
.bc-page {
    max-width: var(--bc-content-max);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}
.bc-page-narrow { max-width: 520px; }

.bc-page-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}
.bc-page-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 72px; }

/* ---------- Hero ---------- */
.bc-hero {
    background:
      radial-gradient(circle at 20% 0%, rgba(184, 134, 11, .08), transparent 60%),
      radial-gradient(circle at 80% 100%, rgba(26, 47, 75, .07), transparent 60%),
      var(--bc-bg-elev);
    border-bottom: 1px solid var(--bc-border);
}
[data-theme="dark"] .bc-hero {
    background:
      radial-gradient(circle at 20% 0%, rgba(212, 175, 55, .07), transparent 60%),
      radial-gradient(circle at 80% 100%, rgba(123, 165, 217, .05), transparent 60%),
      var(--bc-bg-elev);
}
.bc-hero-inner {
    max-width: var(--bc-content-max);
    margin: 0 auto;
    padding: 4.5rem 1.25rem 4rem;
    text-align: center;
}
.bc-hero-title {
    font-family: var(--bc-font-display);
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3.25rem);
    letter-spacing: -.01em;
    line-height: 1.05;
    margin: .65rem 0 1.25rem;
    text-wrap: balance;
}
.bc-hero-sub {
    color: var(--bc-text-muted);
    font-size: 1.08rem;
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}
.bc-hero-cta { display: inline-flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }

.bc-kicker {
    font-family: var(--bc-font-sc);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--bc-gold);
    margin: 0;
}

/* ---------- Categories ---------- */
.bc-cat { margin-bottom: 2.25rem; }
.bc-cat-hdr {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem;
    padding: 0 .25rem .75rem;
    border-bottom: 2px solid var(--bc-border);
    margin-bottom: 1rem;
}
.bc-cat-title {
    font-family: var(--bc-font-display);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--bc-text);
}
.bc-cat-sub {
    font-family: var(--bc-font-body);
    font-style: italic;
    font-size: .98rem;
    color: var(--bc-text-muted);
    margin: 0;
}

/* ---------- Forum rows ---------- */
.bc-forum-list { list-style: none; padding: 0; margin: 0; }

.bc-forum-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 100px minmax(0, 1.1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem .9rem;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    margin-bottom: .5rem;
    transition: border-color .15s, box-shadow .15s;
}
.bc-forum-row:hover {
    border-color: var(--bc-border);
    box-shadow: var(--bc-shadow);
}

.bc-forum-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: var(--bc-gold);
    font-size: 1.4rem;
    font-family: var(--bc-font-display);
}

.bc-forum-meta { min-width: 0; }
.bc-forum-name {
    font-family: var(--bc-font-display);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--bc-text);
    display: block;
    margin-bottom: .1rem;
}
.bc-forum-name:hover { color: var(--bc-link); text-decoration: none; }
.bc-forum-desc {
    color: var(--bc-text-muted);
    font-size: .9rem;
    margin: 0;
    line-height: 1.4;
}

.bc-forum-stats {
    text-align: center;
    color: var(--bc-text-muted);
    font-size: .78rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
.bc-forum-stats strong { display: block; color: var(--bc-text); font-size: 1.05rem; font-weight: 600; }

.bc-forum-last { min-width: 0; font-size: .85rem; }
.bc-forum-last-title {
    display: block;
    color: var(--bc-text);
    font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bc-forum-last-meta { color: var(--bc-text-muted); margin-top: .15rem; }

.bc-muted { color: var(--bc-text-faint); font-style: italic; font-family: var(--bc-font-body); }

/* ---------- Cards (sidebar) ---------- */
.bc-card {
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    padding: 1.1rem 1.15rem;
}
.bc-card-quiet { background: var(--bc-bg-quiet); border-style: dashed; }
.bc-card-title {
    font-family: var(--bc-font-sc);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--bc-gold);
    font-weight: 600;
    margin: 0 0 .75rem;
}
.bc-card-sub { color: var(--bc-text-muted); font-size: .85rem; margin: -.5rem 0 .75rem; }
.bc-card-body { color: var(--bc-text-muted); font-family: var(--bc-font-body); font-size: .96rem; line-height: 1.55; margin: 0 0 .5rem; }
.bc-link { color: var(--bc-link); font-weight: 500; font-size: .92rem; }

.bc-stat-list { list-style: none; padding: 0; margin: 0; }
.bc-stat-list li {
    display: flex; justify-content: space-between;
    padding: .35rem 0;
    border-bottom: 1px dashed var(--bc-border-soft);
    font-size: .92rem;
}
.bc-stat-list li:last-child { border-bottom: 0; }
.bc-stat-list span { color: var(--bc-text-muted); }
.bc-stat-list strong { color: var(--bc-text); font-weight: 600; font-variant-numeric: tabular-nums; }

.bc-online-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem .55rem; }
.bc-online-list li { display: inline-flex; align-items: center; gap: .3rem; }
.bc-online-name { font-size: .88rem; color: var(--bc-text); }
.bc-online-name.is-admin { color: var(--bc-red); font-weight: 600; }
.bc-online-name.is-mod { color: var(--bc-sage); font-weight: 600; }

/* ---------- Avatars ---------- */
.bc-avatar {
    background: linear-gradient(135deg, var(--bc-navy), var(--bc-gold));
    color: #FBF8F1;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--bc-font-display);
    font-weight: 600;
    line-height: 1;
    user-select: none;
}
.bc-avatar-xs { width: 22px; height: 22px; font-size: .7rem; }
.bc-avatar-sm { width: 28px; height: 28px; font-size: .85rem; }
.bc-avatar-md { width: 44px; height: 44px; font-size: 1.1rem; }
.bc-avatar-lg { width: 72px; height: 72px; font-size: 1.7rem; }

/* ---------- Forms ---------- */
.bc-auth-card {
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-lg);
    padding: 2.25rem 2rem;
    box-shadow: var(--bc-shadow-lg);
}
.bc-auth-title {
    font-family: var(--bc-font-display);
    font-size: 1.85rem;
    font-weight: 600;
    margin: .25rem 0 .35rem;
}
.bc-auth-sub { color: var(--bc-text-muted); margin-bottom: 1.5rem; font-family: var(--bc-font-body); }
.bc-auth-foot { text-align: center; margin-top: 1.5rem; color: var(--bc-text-muted); font-size: .92rem; }

.bc-form { display: flex; flex-direction: column; gap: 1rem; }
.bc-field { display: flex; flex-direction: column; gap: .35rem; }
.bc-field-label {
    font-size: .82rem; font-weight: 600;
    color: var(--bc-text-muted);
    text-transform: uppercase; letter-spacing: .06em;
}
.bc-field input, .bc-field textarea, .bc-field select {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--bc-border);
    background: var(--bc-bg-input);
    color: var(--bc-text);
    border-radius: var(--bc-radius);
    font: inherit;
    font-family: var(--bc-font-ui);
}
.bc-field textarea { font-family: var(--bc-font-body); line-height: 1.55; min-height: 12rem; }
.bc-field input:focus, .bc-field textarea:focus, .bc-field select:focus {
    outline: none; border-color: var(--bc-gold-bright);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, .12);
}
.bc-field-hint { font-size: .8rem; color: var(--bc-text-faint); }

/* ---------- Empty ---------- */
.bc-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-lg);
}
.bc-empty h1 { font-size: 1.85rem; margin: .35rem 0 .75rem; }
.bc-empty p { color: var(--bc-text-muted); margin-bottom: 1.25rem; }

/* ---------- BBCode rendered content ---------- */
.bc-content { font-family: var(--bc-font-body); font-size: 1.04rem; line-height: 1.68; }
.bc-content p { margin: 0 0 1em; }
.bc-content a { text-decoration: underline; text-underline-offset: 3px; }
.bc-content blockquote.bc-quote {
    border-left: 3px solid var(--bc-gold);
    padding: .6rem 1rem;
    margin: 1em 0;
    background: var(--bc-bg-quiet);
    border-radius: 0 var(--bc-radius) var(--bc-radius) 0;
    color: var(--bc-text-muted);
    font-style: italic;
}
.bc-content .bc-quote-hdr { font-style: normal; font-weight: 600; color: var(--bc-text); margin-bottom: .3rem; font-size: .9rem; }
.bc-content pre.bc-code {
    background: var(--bc-bg-quiet);
    border: 1px solid var(--bc-border-soft);
    padding: .85rem 1rem;
    border-radius: var(--bc-radius);
    overflow-x: auto;
    font-family: var(--bc-font-mono);
    font-size: .9rem; line-height: 1.5;
}
.bc-content code { font-family: var(--bc-font-mono); font-size: .9em; background: var(--bc-bg-quiet); padding: 0 .25rem; border-radius: 3px; }
.bc-content .bc-img { border-radius: var(--bc-radius); margin: .75rem 0; max-width: 100%; }
.bc-content .bc-hr { border: 0; border-top: 1px solid var(--bc-border); margin: 1.5rem 0; }

/* ---------- Footer ---------- */
.bc-footer {
    border-top: 1px solid var(--bc-border);
    background: var(--bc-bg-elev);
    margin-top: 4rem;
}
.bc-footer-inner {
    max-width: var(--bc-content-max);
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    color: var(--bc-text-muted);
    font-size: .9rem;
}
.bc-footer-brand { font-family: var(--bc-font-display); font-size: 1.1rem; color: var(--bc-text); }
.bc-footer-nav { display: flex; gap: 1.25rem; justify-content: center; }
.bc-footer-nav a { color: var(--bc-text-muted); }
.bc-footer-meta { font-family: var(--bc-font-body); font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .bc-page-grid { grid-template-columns: 1fr; }
    .bc-page-side { position: static; }
    .bc-nav { display: none; }
    .bc-header-inner { grid-template-columns: auto 1fr; }
    .bc-forum-row {
        grid-template-columns: 32px minmax(0, 1fr);
        grid-template-areas:
          "icon meta"
          "icon last"
          ".    stats";
        row-gap: .35rem;
    }
    .bc-forum-icon { grid-area: icon; }
    .bc-forum-meta { grid-area: meta; }
    .bc-forum-last { grid-area: last; }
    .bc-forum-stats { grid-area: stats; text-align: left; display: flex; gap: .85rem; font-size: .8rem; }
    .bc-forum-stats strong { display: inline; font-size: .9rem; margin-right: .2rem; }
    .bc-footer-inner { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 540px) {
    .bc-brand-tag { display: none; }
    .bc-userchip-name { display: none; }
    .bc-hero-inner { padding: 3rem 1.25rem 2.5rem; }
    .bc-page { padding: 1.5rem 1rem 3rem; }
    .bc-auth-card { padding: 1.5rem 1.25rem; }
}

/* ---------- Breadcrumbs ---------- */
.bc-breadcrumbs {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    font-size: .88rem; color: var(--bc-text-muted);
    margin-bottom: 1.25rem;
}
.bc-breadcrumbs a { color: var(--bc-text-muted); }
.bc-breadcrumbs a:hover { color: var(--bc-text); }
.bc-bc-sep { color: var(--bc-text-faint); }
.bc-bc-current { color: var(--bc-text); font-weight: 500; }
.bc-bc-cat { color: var(--bc-text); }

/* ---------- Forum / Thread header ---------- */
.bc-forum-hdr {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
    padding-bottom: 1.25rem; margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--bc-border);
}
.bc-forum-h1 {
    font-family: var(--bc-font-display);
    font-size: 2.4rem; font-weight: 600; letter-spacing: -.01em;
    margin: .15rem 0 .35rem;
    text-wrap: balance;
}
.bc-forum-sub {
    color: var(--bc-text-muted);
    font-family: var(--bc-font-body); font-style: italic;
    max-width: 50ch;
    margin: 0;
}
.bc-forum-actions { display: flex; gap: .5rem; }

.bc-thread-hdr {
    padding-bottom: 1.25rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bc-border);
}
.bc-thread-h1 {
    font-family: var(--bc-font-display);
    font-size: 2.1rem; font-weight: 600; letter-spacing: -.01em;
    margin: 0 0 .5rem;
    text-wrap: balance;
}
.bc-thread-meta-bar { color: var(--bc-text-muted); font-size: .9rem; display: flex; gap: .5rem; }

/* ---------- Pin / Lock icons ---------- */
.bc-pin { color: var(--bc-gold-bright); font-size: .9em; }
.bc-lock { font-size: .9em; opacity: .8; }

/* ---------- Nav badge + admin link ---------- */
.bc-nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bc-gold); color: #FBF8F1;
    border-radius: var(--bc-radius-pill);
    font-size: .68rem; font-weight: 700; font-family: var(--bc-font-ui);
    min-width: 18px; height: 18px;
    padding: 0 .35rem;
    margin-left: .2rem;
}
.bc-nav-admin { color: var(--bc-red) !important; font-weight: 600 !important; }
.bc-nav-admin:hover { border-bottom-color: var(--bc-red) !important; }

/* ---------- Thread mod toolbar ---------- */
.bc-thread-toolbar {
    display: flex; gap: .35rem; flex-wrap: wrap;
    margin-top: 1rem; padding-top: .75rem;
    border-top: 1px dashed var(--bc-border-soft);
}
.bc-btn-danger { color: var(--bc-red); }
.bc-btn-danger:hover { border-color: var(--bc-red); color: var(--bc-red); background: rgba(139,44,44,.06); }
.bc-thread-mod-move { position: relative; }
.bc-thread-mod-move summary { list-style: none; cursor: pointer; }
.bc-thread-mod-move summary::-webkit-details-marker { display: none; }
.bc-thread-mod-form {
    position: absolute; top: 100%; left: 0; z-index: 10;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: .75rem;
    display: flex; gap: .5rem; align-items: center;
    box-shadow: var(--bc-shadow-lg);
    margin-top: .25rem;
    min-width: 320px;
}
.bc-thread-mod-form select { padding: .45rem .6rem; border: 1px solid var(--bc-border); background: var(--bc-bg-input); color: var(--bc-text); border-radius: var(--bc-radius-sm); font: inherit; flex: 1; }

/* ---------- Thread list table ---------- */
.bc-thread-table { background: var(--bc-bg-elev); border: 1px solid var(--bc-border-soft); border-radius: var(--bc-radius); overflow: hidden; }
.bc-thread-th {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 80px 200px;
    gap: 1rem;
    padding: .65rem 1rem;
    background: var(--bc-bg-quiet);
    border-bottom: 1px solid var(--bc-border-soft);
    color: var(--bc-text-muted);
    font-family: var(--bc-font-sc);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.bc-th-replies, .bc-th-views { text-align: center; }

.bc-thread-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 80px 200px;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--bc-border-soft);
    color: var(--bc-text);
    transition: background .12s;
}
.bc-thread-row:last-child { border-bottom: 0; }
.bc-thread-row:hover { background: var(--bc-bg-quiet); text-decoration: none; }
.bc-thread-row.is-sticky { background: linear-gradient(90deg, rgba(184, 134, 11, .05), transparent); }

.bc-thread-main { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.bc-thread-titlewrap { min-width: 0; }
.bc-thread-title {
    display: block;
    font-family: var(--bc-font-display);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--bc-text);
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bc-thread-meta { display: block; font-size: .82rem; color: var(--bc-text-muted); margin-top: .15rem; }
.bc-thread-meta strong { font-weight: 600; color: var(--bc-text); }

.bc-thread-replies, .bc-thread-views { text-align: center; font-variant-numeric: tabular-nums; color: var(--bc-text-muted); font-size: .92rem; }
.bc-thread-last { font-size: .82rem; color: var(--bc-text-muted); }
.bc-thread-last-when { color: var(--bc-text); display: block; }

/* ---------- Posts (vBulletin parity) ---------- */
.bc-post-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.bc-post {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 0;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.bc-post-side {
    background: var(--bc-bg-quiet);
    border-right: 1px solid var(--bc-border-soft);
    padding: 1.25rem 1rem;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    gap: .5rem;
}
.bc-post-author {
    font-family: var(--bc-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bc-text);
    margin-top: .35rem;
}
.bc-post-author:hover { color: var(--bc-link); text-decoration: none; }
.bc-post-user-title { font-family: var(--bc-font-sc); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bc-gold); }
.bc-post-rank { font-family: var(--bc-font-sc); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.bc-post-stats { display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; width: 100%; margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--bc-border); color: var(--bc-text-muted); }
.bc-post-stats div { display: flex; justify-content: space-between; width: 100%; }
.bc-post-stats dt { font-weight: 500; }
.bc-post-stats dd { margin: 0; color: var(--bc-text); font-variant-numeric: tabular-nums; }

.bc-badge {
    display: inline-block;
    font-family: var(--bc-font-sc);
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: .15rem .5rem;
    border-radius: var(--bc-radius-pill);
    font-weight: 600;
}
.bc-badge-admin { background: rgba(139, 44, 44, .15); color: var(--bc-red); }
.bc-badge-mod   { background: rgba(78, 107, 82, .15); color: var(--bc-sage); }

.bc-post-main { padding: 1.25rem 1.35rem 1rem; min-width: 0; }
.bc-post-hdr {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: .65rem; margin-bottom: .85rem;
    border-bottom: 1px dashed var(--bc-border);
    font-size: .85rem; color: var(--bc-text-muted);
}
.bc-post-permalink { color: var(--bc-gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-post-permalink:hover { color: var(--bc-gold-bright); text-decoration: none; }

.bc-post-edit {
    font-size: .82rem; color: var(--bc-text-faint); font-style: italic;
    margin-top: .75rem;
}
.bc-post-sig {
    margin-top: 1.25rem; padding-top: .75rem;
    border-top: 1px dashed var(--bc-border);
    font-size: .85rem; color: var(--bc-text-muted);
    font-family: var(--bc-font-body); font-style: italic;
}
.bc-post-actions {
    display: flex; gap: .35rem; flex-wrap: wrap;
    margin-top: 1rem; padding-top: .75rem;
    border-top: 1px dashed var(--bc-border);
}
.bc-postbtn {
    background: transparent;
    border: 1px solid var(--bc-border);
    color: var(--bc-text-muted);
    padding: .3rem .7rem;
    border-radius: var(--bc-radius-sm);
    font-size: .82rem;
    cursor: pointer;
    font-family: var(--bc-font-ui);
    transition: background .12s, color .12s, border-color .12s;
}
.bc-postbtn:hover { background: var(--bc-bg-quiet); color: var(--bc-text); border-color: var(--bc-text-faint); text-decoration: none; }
.bc-postbtn-danger:hover { color: var(--bc-red); border-color: var(--bc-red); }

/* ---------- Quick reply ---------- */
.bc-quickreply {
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: 1.25rem 1.35rem;
    margin-top: 1.5rem;
}
.bc-quickreply-h {
    font-family: var(--bc-font-sc);
    font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--bc-gold); font-weight: 600;
    margin: 0 0 .75rem;
}
.bc-quickreply textarea {
    width: 100%;
    min-height: 8rem;
    border: 1px solid var(--bc-border);
    background: var(--bc-bg-input);
    color: var(--bc-text);
    border-radius: var(--bc-radius);
    padding: .75rem .9rem;
    font-family: var(--bc-font-body); font-size: 1rem; line-height: 1.55;
    resize: vertical;
}
.bc-quickreply textarea:focus { outline: none; border-color: var(--bc-gold-bright); box-shadow: 0 0 0 3px rgba(184, 134, 11, .12); }
.bc-quickreply-actions { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; }
.bc-quickreply-locked { text-align: center; color: var(--bc-text-muted); }

/* ---------- Pagination ---------- */
.bc-pagination {
    display: flex; gap: .25rem; align-items: center; justify-content: center;
    margin: 1.5rem 0; flex-wrap: wrap;
}
.bc-pagination a, .bc-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.25rem; height: 2.25rem;
    padding: 0 .65rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-sm);
    color: var(--bc-text-muted);
    font-size: .9rem; font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.bc-pagination a:hover { background: var(--bc-bg-quiet); color: var(--bc-text); text-decoration: none; }
.bc-pg-current { background: var(--bc-navy); color: #FBF8F1 !important; border-color: var(--bc-navy); }
[data-theme="dark"] .bc-pg-current { color: #0F0E0C !important; }
.bc-pg-gap { border: 0; color: var(--bc-text-faint); }

/* ---------- Avatar XL (profile) ---------- */
.bc-avatar-xl { width: 120px; height: 120px; font-size: 3rem; }

/* ---------- Tabs ---------- */
.bc-tabs { display: flex; gap: 1.25rem; align-items: center; }
.bc-tabs a {
    color: var(--bc-text-muted);
    font-weight: 500; font-size: .92rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}
.bc-tabs a:hover { color: var(--bc-text); text-decoration: none; }
.bc-tabs a.is-active { color: var(--bc-text); border-bottom-color: var(--bc-gold-bright); }

/* ---------- Profile ---------- */
.bc-profile-hdr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bc-border);
}
.bc-profile-name {
    font-family: var(--bc-font-display);
    font-size: 2.4rem; font-weight: 600;
    margin: .15rem 0 .15rem;
    line-height: 1.1;
}
.bc-profile-username { color: var(--bc-text-muted); margin: 0 0 .85rem; }
.bc-profile-title { color: var(--bc-gold); }
.bc-profile-bio { font-family: var(--bc-font-body); color: var(--bc-text); max-width: 60ch; margin: .25rem 0 .85rem; }
.bc-profile-facts { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .88rem; color: var(--bc-text-muted); }
.bc-profile-facts li span:first-child { color: var(--bc-text-faint); font-family: var(--bc-font-sc); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; margin-right: .35rem; }
.bc-profile-actions { display: flex; gap: .5rem; }

.bc-profile-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: var(--bc-bg-quiet);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.bc-profile-stats div { display: flex; flex-direction: column; gap: .15rem; }
.bc-profile-stats strong { font-family: var(--bc-font-display); font-size: 1.8rem; font-weight: 600; color: var(--bc-text); font-variant-numeric: tabular-nums; }
.bc-profile-stats span { font-family: var(--bc-font-sc); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bc-text-muted); }

.bc-recent-list { list-style: none; padding: 0; margin: 0; }
.bc-recent-list li { padding: .75rem 0; border-bottom: 1px dashed var(--bc-border); }
.bc-recent-list li:last-child { border-bottom: 0; }
.bc-recent-title { font-family: var(--bc-font-display); font-size: 1.1rem; font-weight: 600; color: var(--bc-text); display: block; }
.bc-recent-snippet { font-family: var(--bc-font-body); color: var(--bc-text-muted); font-size: .94rem; margin: .15rem 0; line-height: 1.5; }
.bc-recent-meta { font-size: .82rem; color: var(--bc-text-faint); }

.bc-side-list { list-style: none; padding: 0; margin: 0; }
.bc-side-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px dashed var(--bc-border-soft); font-size: .9rem; }
.bc-side-list li:last-child { border-bottom: 0; }
.bc-side-list span { color: var(--bc-text-faint); font-size: .82rem; flex-shrink: 0; }
.bc-card-sig { font-size: .92rem; }

/* ---------- Members grid ---------- */
.bc-member-grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: .75rem;
}
.bc-member-card {
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    transition: border-color .15s, box-shadow .15s;
}
.bc-member-card:hover { border-color: var(--bc-border); box-shadow: var(--bc-shadow); }
.bc-member-link { display: flex; gap: .85rem; padding: .85rem; align-items: center; color: var(--bc-text); }
.bc-member-link:hover { text-decoration: none; }
.bc-member-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bc-member-name { font-family: var(--bc-font-display); font-weight: 600; font-size: 1.08rem; }
.bc-member-handle { color: var(--bc-text-muted); font-size: .82rem; }
.bc-member-meta { color: var(--bc-text-faint); font-size: .78rem; }

/* ---------- Settings ---------- */
.bc-settings-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}
.bc-settings-nav {
    display: flex; flex-direction: column; gap: 0;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border-soft);
    border-radius: var(--bc-radius);
    padding: .5rem 0;
}
.bc-settings-nav a {
    padding: .55rem 1rem;
    color: var(--bc-text-muted);
    font-size: .92rem;
    border-left: 3px solid transparent;
}
.bc-settings-nav a:hover { background: var(--bc-bg-quiet); color: var(--bc-text); text-decoration: none; }
.bc-settings-nav a.is-active { color: var(--bc-text); background: var(--bc-bg-quiet); border-left-color: var(--bc-gold-bright); font-weight: 600; }
.bc-settings-panel {
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: 1.75rem 1.85rem;
}

@media (max-width: 760px) {
    .bc-profile-hdr { grid-template-columns: auto 1fr; }
    .bc-profile-actions { grid-column: 1 / -1; }
    .bc-settings-grid { grid-template-columns: 1fr; }
    .bc-settings-nav { flex-direction: row; overflow-x: auto; }
    .bc-settings-nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
    .bc-settings-nav a.is-active { border-bottom-color: var(--bc-gold-bright); border-left: 0; }
}

/* ---------- Search ---------- */
.bc-searchbar {
    display: flex; gap: .5rem;
    margin-bottom: 1.5rem;
    background: var(--bc-bg-elev);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: .35rem .35rem .35rem .85rem;
}
.bc-searchbar input[type=search] {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--bc-text);
    font: inherit; font-family: var(--bc-font-body);
    font-size: 1.04rem;
    padding: .55rem 0;
}
.bc-searchbar input[type=search]:focus { outline: none; }
.bc-searchbar select {
    background: var(--bc-bg-input);
    border: 1px solid var(--bc-border);
    color: var(--bc-text);
    border-radius: var(--bc-radius-sm);
    padding: .4rem .6rem;
    font: inherit;
}

.bc-search-results { list-style: none; padding: 0; margin: 0; }
.bc-search-result {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--bc-border-soft);
}
.bc-search-result:last-child { border-bottom: 0; }
.bc-search-title {
    font-family: var(--bc-font-display);
    font-size: 1.2rem; font-weight: 600;
    color: var(--bc-text);
    display: block;
}
.bc-search-title:hover { color: var(--bc-link); text-decoration: none; }
.bc-search-snippet {
    font-family: var(--bc-font-body);
    color: var(--bc-text-muted);
    font-size: .96rem; line-height: 1.55;
    margin: .25rem 0;
}
.bc-search-snippet mark { background: rgba(184, 134, 11, .25); color: var(--bc-text); padding: 0 .15em; border-radius: 2px; }
.bc-search-meta { font-size: .82rem; color: var(--bc-text-faint); margin: 0; }

/* ---------- Unread indicator ---------- */
.bc-thread-row.is-unread .bc-thread-title { font-weight: 700; }
.bc-unread-dot { color: var(--bc-gold-bright); font-size: .65em; vertical-align: middle; }

/* ---------- PM list ---------- */
.bc-pm-list { list-style: none; padding: 0; margin: 0; background: var(--bc-bg-elev); border: 1px solid var(--bc-border-soft); border-radius: var(--bc-radius); overflow: hidden; }
.bc-pm-item { border-bottom: 1px solid var(--bc-border-soft); transition: background .12s; }
.bc-pm-item:last-child { border-bottom: 0; }
.bc-pm-item:hover { background: var(--bc-bg-quiet); }
.bc-pm-item.is-unread { background: linear-gradient(90deg, rgba(184, 134, 11, .04), transparent); }
.bc-pm-link { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .85rem 1.1rem; color: var(--bc-text); }
.bc-pm-link:hover { text-decoration: none; }
.bc-pm-main { min-width: 0; }
.bc-pm-subject { font-family: var(--bc-font-display); font-size: 1.1rem; font-weight: 600; display: block; }
.bc-pm-item.is-unread .bc-pm-subject { font-weight: 700; }
.bc-pm-others { display: block; font-size: .82rem; color: var(--bc-text-muted); }
.bc-pm-preview { display: block; color: var(--bc-text-muted); font-size: .9rem; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60ch; }
.bc-pm-meta { font-size: .82rem; color: var(--bc-text-faint); text-align: right; flex-shrink: 0; display: flex; flex-direction: column; gap: .1rem; }
.bc-pm-sender { color: var(--bc-text-muted); }

/* ---------- Composer (BBCode editor) ---------- */
.bc-composer {
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    overflow: hidden;
    background: var(--bc-bg-input);
}
.bc-composer:focus-within { border-color: var(--bc-gold-bright); box-shadow: 0 0 0 3px rgba(184, 134, 11, .12); }
.bc-composer-bar {
    display: flex; gap: .2rem; align-items: center;
    padding: .35rem .5rem;
    background: var(--bc-bg-quiet);
    border-bottom: 1px solid var(--bc-border);
    flex-wrap: wrap;
}
.bc-cb {
    background: transparent; border: 1px solid transparent;
    color: var(--bc-text-muted);
    padding: .25rem .55rem;
    border-radius: var(--bc-radius-sm);
    font-family: var(--bc-font-ui);
    font-size: .92rem;
    cursor: pointer;
    line-height: 1;
}
.bc-cb:hover { background: var(--bc-bg-elev); color: var(--bc-text); border-color: var(--bc-border); }
.bc-cb-sep { width: 1px; height: 18px; background: var(--bc-border); margin: 0 .25rem; }
.bc-composer-area {
    width: 100%;
    border: 0;
    background: var(--bc-bg-input);
    color: var(--bc-text);
    padding: .85rem 1rem;
    font-family: var(--bc-font-body);
    font-size: 1.02rem; line-height: 1.6;
    resize: vertical;
    min-height: 16rem;
}
.bc-composer-area:focus { outline: 0; }

.bc-form-actions {
    display: flex; justify-content: flex-end; gap: .5rem;
    padding-top: .5rem;
}

/* ---------- Post + thread responsive ---------- */
@media (max-width: 760px) {
    .bc-post { grid-template-columns: 1fr; }
    .bc-post-side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--bc-border-soft); text-align: left; gap: .75rem; }
    .bc-post-stats { flex-direction: row; gap: .75rem; border-top: 0; padding-top: 0; margin-top: 0; }
    .bc-post-stats div { width: auto; }
    .bc-thread-th { display: none; }
    .bc-thread-row { grid-template-columns: 1fr; gap: .25rem; padding: .85rem 1rem; }
    .bc-thread-replies, .bc-thread-views, .bc-thread-last { text-align: left; font-size: .8rem; }
    .bc-thread-replies::before { content: "Replies: "; color: var(--bc-text-faint); }
    .bc-thread-views::before { content: "Views: "; color: var(--bc-text-faint); }
    .bc-thread-last-when::before { content: "Last: "; color: var(--bc-text-faint); }
}
