/* ============================================================
   CarpTalkUSA — Stylesheet (dark theme)
   ============================================================ */

:root {
  --bg:         #0f1117;
  --surface:    #171c24;
  --surface-2:  #1e2530;
  --surface-3:  #252d3a;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.04);
  --text-1:     #d4dce8;
  --text-2:     #8896a7;
  --text-3:     #52606e;
  --accent:     #2ead6a;
  --accent-dark:#1e8a52;
  --accent-bg:  rgba(46,173,106,0.10);
  --accent-border: rgba(46,173,106,0.25);
  --header-bg:  #0b0e14;
  --danger:     #e05252;
  --danger-bg:  rgba(224,82,82,0.10);
  --danger-border: rgba(224,82,82,0.25);
  --success:    #2ead6a;
  --success-bg: rgba(46,173,106,0.10);
  --success-border: rgba(46,173,106,0.25);
  --radius:     6px;
  --radius-lg:  8px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.page-wrap { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #50c888; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.3;
  color: var(--text-1);
}

.container { max-width: 1680px; margin: 0 auto; }
.muted { color: var(--text-3); font-size: 0.875rem; }
.hint  { color: var(--text-3); font-size: 0.8rem; }

/* ---- Header ---- */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.4rem; line-height: 1; }
.logo-text { display: flex; flex-direction: column; }
.logo-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.logo-tagline {
  font-size: 0.6rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  margin-top: 1px;
}

.main-nav { display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--text-2);
  padding: 0.38rem 0.65rem;
  border-radius: var(--radius);
  font-size: 0.845rem;
  font-weight: 500;
  transition: color 0.12s, background 0.12s;
}
.main-nav a:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }

.nav-menu-admin { color: #7dd3a8 !important; }
.nav-menu-admin:hover { background: rgba(125,211,168,0.07) !important; color: #7dd3a8 !important; }

.nav-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); flex-shrink: 0; }
.nav-avatar-placeholder {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; flex-shrink: 0;
}

.nav-user-dropdown { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 0.38rem 0.65rem;
  border-radius: var(--radius); font-size: 0.845rem; font-weight: 500;
  font-family: inherit; transition: color 0.12s, background 0.12s;
}
.nav-user-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.nav-caret { font-size: 0.6rem; opacity: 0.5; margin-left: 1px; }
.nav-user-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 160px;
  box-shadow: var(--shadow-md); overflow: hidden; z-index: 200;
}
.nav-user-menu.open { display: block; }
.nav-user-menu a,
.nav-user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 0.55rem 1rem; font-size: 0.845rem; color: var(--text-2);
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-weight: 500; transition: background 0.1s, color 0.1s; text-decoration: none;
}
.nav-user-menu a:hover,
.nav-user-menu button:hover { background: rgba(255,255,255,0.05); color: var(--text-1); }
.nav-menu-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

.btn-nav { padding: 0.35rem 0.65rem; border-radius: var(--radius); font-size: 0.845rem; font-weight: 500; color: var(--text-2) !important; border: 1px solid transparent; }
.btn-nav-primary { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.btn-nav-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-nav-logout {
  background: none; border: 1px solid var(--border);
  color: var(--text-2); padding: 0.32rem 0.6rem;
  border-radius: var(--radius); font-size: 0.82rem;
  cursor: pointer; font-family: inherit; transition: color 0.12s, border-color 0.12s;
}
.btn-nav-logout:hover { color: var(--text-1); border-color: rgba(255,255,255,0.15); }

.nav-bell {
  position: relative; display: flex; align-items: center;
  padding: 0.38rem 0.5rem; border-radius: var(--radius);
  color: var(--text-2); transition: color 0.12s, background 0.12s;
}
.nav-bell:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.nav-bell svg { display: block; }
.nav-bell-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff;
  font-size: 0.58rem; font-weight: 700;
  min-width: 14px; height: 14px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
}

/* ---- Nav mobile ---- */
@media (max-width: 640px) {
  .nav-username { display: none; }
  .nav-caret { display: none; }
  .logo-tagline { display: none; }
  .header-inner { padding: 0.6rem 1rem; }
  .main-nav { gap: 0; }
  .main-nav > a:not(.nav-bell) { padding: 0.38rem 0.45rem; font-size: 0.8rem; }
}

/* ---- Notifications Page ---- */
.notif-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.notif-item {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-2);
  text-decoration: none; color: inherit;
  transition: background 0.1s; position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-unread { background: rgba(46,173,106,0.04); }
.notif-avatar img, .notif-avatar-ph {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
}
.notif-avatar-ph {
  background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 0.875rem; color: var(--text-2); margin: 0 0 0.15rem; }
.notif-text strong { color: var(--text-1); }
.notif-time { font-size: 0.75rem; color: var(--text-3); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.btn-subscribed { color: var(--accent) !important; border-color: var(--accent-border) !important; }
.thread-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Anti-Bowfishing Banner ---- */
.anti-bowfishing-banner {
  background: #0b0e14;
  border-bottom: 1px solid var(--border-2);
  padding: 0.38rem 1.5rem;
}
.anti-bowfishing-banner .container {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: var(--text-3);
}
.anti-bowfishing-banner strong { color: var(--text-2); font-weight: 500; }

/* ---- Main ---- */
.main-content { flex: 1; padding: 1.5rem 1.5rem 2rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; padding: 0.5rem 1rem;
  border-radius: var(--radius); font-size: 0.875rem; font-weight: 600;
  font-family: inherit; cursor: pointer; border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-outline:hover { border-color: rgba(255,255,255,0.2); color: var(--text-1); background: rgba(255,255,255,0.05); }
.btn-ghost { background: rgba(255,255,255,0.06); border-color: var(--border); color: var(--text-1); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #c43c3c; border-color: #c43c3c; color: #fff; }
.btn-sm { padding: 0.28rem 0.65rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.845rem; font-family: inherit; padding: 0; text-decoration: underline; }
.btn-link:hover { color: #50c888; }
.btn-link-danger { color: var(--danger); }
.btn-link-danger:hover { color: #c43c3c; }

/* ---- Welcome Strip (guests only) ---- */
.welcome-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.welcome-text h1 {
  font-size: 1.3rem;
  color: var(--text-1);
  font-family: 'Merriweather', serif;
  margin-bottom: 0.2rem;
}
.welcome-text p { font-size: 0.875rem; color: var(--text-2); }
.welcome-text strong { color: var(--text-1); }
.welcome-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ---- Forum Index Layout ---- */
.forum-index {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 960px) { .forum-index { grid-template-columns: 1fr; } }

/* ---- Forum Section ---- */
.forum-section { margin-bottom: 1.5rem; }

.forum-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0.6rem;
}
.forum-section-title {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}
.forum-section-cols {
  display: flex;
  gap: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  align-items: center;
}
.forum-section-cols span { width: 80px; text-align: center; }
.forum-section-cols .col-forum { width: 200px; text-align: left; }
.forum-section-cols .col-latest { width: 220px; text-align: left; padding-left: 0.25rem; }

/* ---- Category List ---- */
.cat-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cat-row {
  display: grid;
  grid-template-columns: 46px 1fr 260px;
  gap: 0.875rem;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: var(--surface-2); }

@media (max-width: 760px) {
  .cat-row { grid-template-columns: 42px 1fr; }
  .cat-latest-col { display: none; }
}

.cat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

.cat-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-1);
  display: block;
  margin-bottom: 0.15rem;
  font-family: 'Inter', sans-serif;
}
.cat-name:hover { color: var(--accent); }

.cat-desc { font-size: 0.78rem; color: var(--text-3); line-height: 1.4; margin: 0 0 0.35rem; }

.cat-counts {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; color: var(--text-3);
}
.cat-counts strong { color: var(--text-2); font-weight: 600; }
.cat-count-sep { color: var(--text-3); opacity: 0.5; }

.cat-latest-col { min-width: 0; }
.cat-latest-inner {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0;
}
.cat-latest-text { flex: 1; min-width: 0; }
.cat-latest-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}
.cat-latest-title:hover { color: var(--text-1); }
.cat-latest-meta { font-size: 0.72rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-latest-meta a { color: var(--text-3); }
.cat-latest-meta a:hover { color: var(--accent); }
.cat-empty { font-size: 0.78rem; color: var(--text-3); font-style: italic; }

.cat-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); flex-shrink: 0; }
.cat-user-avatar-ph {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

/* ---- Sidebar ---- */
.forum-sidebar { display: flex; flex-direction: column; gap: 0.875rem; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
}
.sidebar-card h3 {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.28rem 0; border-bottom: 1px solid var(--border-2);
  font-size: 0.82rem; color: var(--text-3);
}
.stat-row:last-child { border-bottom: none; }
.stat-row strong { color: var(--text-2); font-weight: 600; }
.stat-row a { color: var(--accent); }

.mission-card { border-left: 2px solid var(--accent); }
.mission-card p { font-size: 0.82rem; color: var(--text-2); line-height: 1.55; margin-bottom: 0.5rem; }
.mission-card strong { color: var(--text-1); }

.join-card { border-color: var(--accent-border); }
.join-card h3 { color: var(--accent); border-bottom-color: var(--accent-border); }
.join-card p { font-size: 0.82rem; color: var(--text-2); line-height: 1.55; }

/* ---- Activity Feed ---- */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-2);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 0.2rem;
}
.activity-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 600; font-family: 'Inter', sans-serif; }
.activity-cat:hover { color: #50c888; }
.activity-replies { font-size: 0.68rem; color: var(--text-3); }

.activity-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.35;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-title:hover { color: var(--text-1); }

.activity-footer { display: flex; align-items: center; gap: 0.4rem; }
.activity-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.activity-avatar-ph {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 700;
}
.activity-time { font-size: 0.7rem; color: var(--text-3); }

/* ---- Page Header ---- */
.page-header { margin-bottom: 1.1rem; }
.breadcrumb { font-size: 0.775rem; color: var(--text-3); margin-bottom: 0.4rem; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-2); }
.page-header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.5rem; color: var(--text-1); }
.page-subtitle { color: var(--text-3); margin-top: 0.2rem; font-size: 0.875rem; }

/* ---- Thread List ---- */
.thread-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.thread-row {
  display: grid;
  grid-template-columns: 34px 1fr 90px 150px;
  gap: 0.875rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
}
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: var(--surface-2); }
.thread-row.pinned { background: var(--accent-bg); }
.thread-row.locked { opacity: 0.7; }

@media (max-width: 700px) {
  .thread-row { grid-template-columns: 28px 1fr; }
  .thread-stats, .thread-latest { display: none; }
}

.thread-icon { font-size: 0.95rem; text-align: center; color: var(--text-3); }
.thread-title {
  font-weight: 600; font-size: 0.875rem; color: var(--text-1);
  display: block; margin-bottom: 0.15rem; font-family: 'Inter', sans-serif;
}
.thread-title:hover { color: var(--accent); }
.thread-meta { font-size: 0.75rem; color: var(--text-3); }
.thread-meta a { color: var(--text-3); }
.thread-meta a:hover { color: var(--accent); }

.thread-stats { display: flex; gap: 0.875rem; justify-content: center; }
.stat-col { display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: var(--text-3); }
.stat-col strong { font-size: 0.875rem; color: var(--text-2); }

.thread-latest { display: flex; flex-direction: column; font-size: 0.75rem; color: var(--text-3); text-align: right; }
.latest-by a { color: var(--text-3); }
.latest-by a:hover { color: var(--accent); }
.latest-time { font-size: 0.7rem; }

/* ---- Tags / Badges ---- */
.tag {
  display: inline-block; padding: 0.1rem 0.38rem; border-radius: 3px;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; margin-left: 0.4rem; vertical-align: middle;
  font-family: 'Inter', sans-serif;
}
.tag-pin  { background: rgba(234,179,8,0.15); color: #ca8a04; border: 1px solid rgba(234,179,8,0.25); }
.tag-lock { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }

.badge-admin { display:inline-block; background:rgba(234,179,8,0.15); color:#ca8a04; padding:0.1rem 0.4rem; border-radius:3px; font-size:0.65rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; margin-left:0.3rem; font-family:'Inter',sans-serif; }
.badge-mod   { display:inline-block; background:rgba(139,92,246,0.15); color:#a78bfa; padding:0.1rem 0.4rem; border-radius:3px; font-size:0.65rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; margin-left:0.3rem; font-family:'Inter',sans-serif; }
.badge-banned{ display:inline-block; background:var(--danger-bg); color:var(--danger); padding:0.1rem 0.4rem; border-radius:3px; font-size:0.65rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; margin-left:0.3rem; font-family:'Inter',sans-serif; }

/* ---- Posts ---- */
.posts-list { display: flex; flex-direction: column; gap: 0.65rem; }
.post {
  display: grid;
  grid-template-columns: 140px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 700px) {
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
}
.post-author {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 1.1rem 0.875rem;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.3rem; text-align: center;
}
.post-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}
.post-avatar-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; border: 2px solid var(--border);
}
.post-username { font-weight: 600; font-size: 0.845rem; color: var(--text-1); display: block; }
.post-username:hover { color: var(--accent); }
.post-user-stats { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.68rem; color: var(--text-3); }

.post-body { display: flex; flex-direction: column; padding: 1rem 1.25rem; }
.post-header {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; color: var(--text-3);
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 0.6rem; margin-bottom: 0.875rem;
}
.post-date { flex: 1; }
.post-edited { font-style: italic; }
.post-num { margin-left: auto; color: var(--text-3); text-decoration: none; }
.post-num:hover { color: var(--accent); }
.post-content { flex: 1; font-size: 0.9rem; line-height: 1.75; color: var(--text-1); word-break: break-word; }
.post-footer { margin-top: 0.875rem; padding-top: 0.6rem; border-top: 1px solid var(--border-2); }
.post-actions { display: flex; gap: 0.875rem; }
.edit-form { margin-top: 0.75rem; }
.edit-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* ---- Reply Box ---- */
.reply-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1rem;
}
.reply-box h3 { font-size: 0.875rem; margin-bottom: 0.75rem; color: var(--text-1); font-family: 'Inter', sans-serif; font-weight: 600; }
.reply-box-guest, .reply-box-locked {
  text-align: center; color: var(--text-3);
  padding: 1.4rem; background: var(--surface-2);
  border-radius: var(--radius); font-size: 0.875rem;
}
.reply-actions { margin-top: 0.65rem; }
.mod-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 0.25rem; justify-content: center; margin: 1.25rem 0; flex-wrap: wrap; }
.pagination-top { margin-top: 0; margin-bottom: 0.75rem; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 0.55rem;
  border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.82rem; font-weight: 500;
  transition: all 0.1s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- New Thread Page ---- */
.new-thread-form { display: flex; flex-direction: column; gap: 0.875rem; }

.new-thread-title-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: border-color 0.12s;
}
.new-thread-title-input::placeholder { color: var(--text-3); }
.new-thread-title-input:focus { outline: none; border-color: var(--accent); }

.new-thread-cols {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0.875rem;
  align-items: start;
}
@media (max-width: 800px) { .new-thread-cols { grid-template-columns: 1fr; } }

.new-thread-textarea {
  width: 100%;
  min-height: 360px;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-1);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.12s;
}
.new-thread-textarea::placeholder { color: var(--text-3); }
.new-thread-textarea:focus { outline: none; border-color: var(--accent); }

.thread-options-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.thread-options-header {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.thread-options-body { padding: 1rem; display: flex; flex-direction: column; gap: 1.1rem; }
.thread-opt-section { display: flex; flex-direction: column; gap: 0.45rem; }
.thread-opt-label { font-size: 0.78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.thread-opt-radio { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.845rem; color: var(--text-2); }
.thread-opt-radio:hover { color: var(--text-1); }
.thread-opt-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.845rem; color: var(--text-2); }
.thread-opt-forum-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.thread-opt-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.845rem; color: var(--text-2); }
.thread-opt-check:hover { color: var(--text-1); }

/* Custom radio + checkbox for dark theme */
.thread-opt-radio input[type="radio"],
.thread-opt-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(255,255,255,0.22);
  background: var(--surface-3);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.12s, background 0.12s;
  position: relative;
}
.thread-opt-radio input[type="radio"] {
  border-radius: 50%;
}
.thread-opt-check input[type="checkbox"] {
  border-radius: 3px;
}
.thread-opt-radio input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface-3);
}
.thread-opt-check input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.thread-opt-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.5px;
  width: 5px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.thread-opt-radio input[type="radio"]:hover,
.thread-opt-check input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.thread-opt-sublabel { display: block; font-size: 0.775rem; color: var(--text-3); margin-bottom: 0.3rem; }
.thread-opt-section-meta { margin-top: 0.25rem; padding-top: 0.75rem; border-top: 1px solid var(--border-2); }

/* Poll builder */
.poll-builder { display: flex; flex-direction: column; gap: 0.5rem; }
.poll-count-input { max-width: 80px; }
.poll-options-list { display: flex; flex-direction: column; gap: 0.4rem; }
.poll-option-input { margin: 0; }

.new-thread-actions { display: flex; gap: 0.625rem; }

/* ---- Forms ---- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 720px;
  margin: 0 auto;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; font-size: 0.845rem; color: var(--text-1); margin-bottom: 0.3rem; }

.form-input, .form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-1);
  background: var(--surface-2);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-textarea { resize: vertical; min-height: 120px; }

.reply-textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-1);
  background: var(--surface-2);
  resize: vertical;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.reply-textarea::placeholder { color: var(--text-3); }
.reply-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.form-actions { display: flex; gap: 0.65rem; margin-top: 1.1rem; flex-wrap: wrap; }
.agree-group label { font-weight: 400; display: flex; align-items: flex-start; gap: 0.5rem; }
.agree-group input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.checkbox-label { display: flex !important; align-items: flex-start; gap: 0.5rem; font-weight: 400 !important; cursor: pointer; }

/* ---- Auth Pages ---- */
.auth-page { display: flex; justify-content: center; padding: 3rem 0; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}
.auth-logo { font-size: 1.75rem; text-align: center; margin-bottom: 0.75rem; }
.auth-card h1 { text-align: center; font-size: 1.3rem; margin-bottom: 0.2rem; }
.auth-subtitle { text-align: center; color: var(--text-3); font-size: 0.82rem; margin-bottom: 1.25rem; }
.auth-switch { text-align: center; font-size: 0.82rem; color: var(--text-3); margin-top: 1rem; }

/* ---- Alerts ---- */
.alert { padding: 0.7rem 0.875rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.845rem; border: 1px solid transparent; }
.alert p { margin: 0; }
.alert p + p { margin-top: 0.2rem; }
.alert-error   { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }

/* ---- Profile (redesigned) ---- */
.profile-wrap { width: 100%; }

.profile-cover {
  height: 160px;
  width: 100%;
  position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  margin-bottom: 0;
}
.profile-cover-edit {
  position: absolute; top: 0.75rem; right: 1rem;
  background: rgba(0,0,0,0.45); color: #fff; border-radius: var(--radius);
  padding: 0.3rem 0.75rem; font-size: 0.78rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s;
}
.profile-cover-edit:hover { background: rgba(0,0,0,0.65); color: #fff; }

.profile-identity {
  display: flex; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.profile-identity-avatar { position: relative; flex-shrink: 0; margin-top: -40px; }
.profile-big-avatar {
  width: 88px; height: 88px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.profile-big-avatar-ph {
  background: var(--accent-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.25rem; font-weight: 700;
}
.profile-online-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--accent); border-radius: 50%;
  border: 2px solid var(--surface);
}
.profile-identity-info { flex: 1; padding-top: 0.75rem; min-width: 0; }
.profile-identity-name { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.profile-identity-name h1 { font-size: 1.4rem; line-height: 1.2; }
.profile-identity-meta { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-3); margin-top: 0.3rem; }
.profile-identity-meta strong { color: var(--text-2); }
.profile-meta-sep { color: var(--text-3); }
.profile-seen-online { color: var(--accent); font-weight: 500; }
.profile-identity-bio { margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }
.profile-admin-actions { display: flex; gap: 0.5rem; align-items: flex-end; padding-bottom: 0.15rem; flex-wrap: wrap; }

.profile-cols { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; align-items: start; }

.profile-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1.25rem; overflow: hidden;
}
.profile-section:last-child { margin-bottom: 0; }
.profile-section-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.profile-section-count {
  background: var(--surface-3); color: var(--text-3);
  font-size: 0.7rem; padding: 0.1rem 0.45rem;
  border-radius: 20px; margin-left: auto;
}
.profile-empty { padding: 1rem 1.25rem; font-size: 0.845rem; }

/* Thread list */
.profile-thread-list { display: flex; flex-direction: column; }
.profile-thread-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border-2); font-size: 0.845rem;
}
.profile-thread-row:last-child { border-bottom: none; }
.profile-thread-main { flex: 1; min-width: 0; }
.profile-thread-title { display: block; color: var(--text-1); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-thread-title:hover { color: var(--accent); }
.profile-thread-meta { font-size: 0.78rem; color: var(--text-3); }
.profile-thread-meta a { color: var(--text-3); }
.profile-thread-meta a:hover { color: var(--accent); }
.profile-thread-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; font-size: 0.775rem; color: var(--text-3); flex-shrink: 0; }
.profile-thread-replies { color: var(--text-2); font-size: 0.78rem; }

/* Post list */
.profile-post-list { display: flex; flex-direction: column; }
.profile-post-row {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-2);
}
.profile-post-row:last-child { border-bottom: none; }
.profile-post-thread { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.25rem; }
.profile-post-thread a { color: var(--accent); }
.profile-post-excerpt { font-size: 0.845rem; color: var(--text-2); line-height: 1.55; margin-bottom: 0.3rem; }
.profile-post-date { font-size: 0.775rem; }

/* Profile comments */
.profile-comment-list { display: flex; flex-direction: column; }
.profile-comment {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-2);
  position: relative;
}
.profile-comment:last-child { border-bottom: none; }
.profile-comment-author { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.profile-comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.profile-comment-avatar-ph {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.profile-comment-meta { display: flex; align-items: baseline; gap: 0.5rem; }
.profile-comment-name { font-weight: 600; font-size: 0.875rem; color: var(--text-1); }
.profile-comment-name:hover { color: var(--accent); }
.profile-comment-body { font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }
.profile-comment-del { display: inline; margin-top: 0.35rem; }
.profile-comment-form { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }

/* Sidebar cards */
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden;
}
.profile-card:last-child { margin-bottom: 0; }
.profile-card-header {
  padding: 0.65rem 1rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.profile-card-body { padding: 0.5rem 0; }
.profile-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.45rem 1rem; font-size: 0.845rem;
  border-bottom: 1px solid var(--border-2);
}
.profile-stat-row:last-child { border-bottom: none; }
.profile-stat-label { color: var(--text-3); }
.profile-stat-val { color: var(--text-1); font-weight: 500; text-align: right; max-width: 55%; word-break: break-all; }
.text-accent { color: var(--accent) !important; }
.profile-website-link { color: var(--accent); font-size: 0.8rem; }

.profile-forum-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 1rem; font-size: 0.845rem;
  border-bottom: 1px solid var(--border-2);
}
.profile-forum-row:last-child { border-bottom: none; }
.profile-forum-rank { color: var(--text-3); font-size: 0.78rem; width: 20px; flex-shrink: 0; }
.profile-forum-name { flex: 1; color: var(--text-1); }
.profile-forum-name:hover { color: var(--accent); }
.profile-forum-count { color: var(--text-3); font-size: 0.8rem; }

/* ---- Settings (redesigned) ---- */
.settings-form { width: 100%; }
.settings-cols { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.settings-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  margin-bottom: 1.25rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.settings-section-desc { font-size: 0.845rem; color: var(--text-3); margin-bottom: 1rem; margin-top: -0.5rem; }

.settings-user-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.settings-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.settings-avatar-ph { width: 48px !important; height: 48px !important; font-size: 1.25rem !important; }

.cover-color-row { display: flex; align-items: center; gap: 0.75rem; }
.cover-color-input { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; }

/* Privacy toggles */
.settings-toggle-row {
  display: grid; grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 1rem; align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-2);
}
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-label { font-size: 0.875rem; font-weight: 500; color: var(--text-1); }
.settings-toggle-hint { font-size: 0.78rem; color: var(--text-3); grid-column: 1; }
.settings-toggle {
  grid-column: 2; grid-row: 1 / 3;
  align-self: center; cursor: pointer;
  display: flex; align-items: center;
}
.settings-toggle input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.settings-toggle-track {
  display: block; width: 40px; height: 22px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 11px; position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.settings-toggle-track::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-3); top: 2px; left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.settings-toggle input:checked + .settings-toggle-track {
  background: var(--accent-bg); border-color: var(--accent);
}
.settings-toggle input:checked + .settings-toggle-track::after {
  background: var(--accent); transform: translateX(18px);
}

/* Settings sidebar */
.settings-sidebar { position: sticky; top: 1.5rem; }
.settings-tips-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.settings-tips-header {
  padding: 0.65rem 1rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.settings-tips-list {
  padding: 0.875rem 1rem 0.875rem 1.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-3); line-height: 1.55;
}
.settings-tips-list strong { color: var(--text-2); }

/* ---- Static Pages (About / Rules) ---- */

/* Hero banner */
.static-hero-banner {
  background: linear-gradient(135deg, #1a3a2a 0%, #0f1e15 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  margin-bottom: 1.5rem;
}
.static-hero-banner-rules {
  background: linear-gradient(135deg, #1a1e2a 0%, #0f1117 100%);
}
.static-hero-inner {
  display: flex; align-items: center; gap: 1.25rem;
}
.static-hero-icon { font-size: 2.5rem; flex-shrink: 0; }
.static-hero-banner h1 { font-size: 1.75rem; margin-bottom: 0.3rem; color: #fff; }
.static-hero-sub { font-size: 0.925rem; color: var(--text-2); line-height: 1.6; margin: 0; }

/* Two-column layout */
.static-cols {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.25rem;
  align-items: start;
}
.static-main { display: flex; flex-direction: column; gap: 1rem; }

/* About: content cards */
.static-card {
  display: flex; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.static-card-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.static-card-body { flex: 1; min-width: 0; }
.static-card h2 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--text-1); }
.static-card p { color: var(--text-2); line-height: 1.75; margin-bottom: 0.6rem; font-size: 0.875rem; }
.static-card p:last-child { margin-bottom: 0; }
.static-card-actions { display: flex; gap: 0.625rem; margin-top: 1rem; }

.static-card-bowfishing {
  background: #0b0e14;
  border-color: rgba(224,82,82,0.2);
}
.static-card-bowfishing h2 { color: var(--danger); }
.static-card-bowfishing p { color: var(--text-2); }
.static-card-bowfishing strong { color: var(--text-1); }

.static-card-join { border-color: var(--accent-border); background: var(--accent-bg); }
.static-card-join h2 { color: var(--accent); }

/* About: checklist */
.static-checklist { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; }
.static-checklist li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; color: var(--text-2); line-height: 1.5; }
.check-icon { color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 0.05rem; }

/* Rules: rule cards */
.rule-card {
  display: flex; gap: 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.rule-card-critical { border-left: 3px solid var(--danger); }
.rule-card-enforcement { border-left: 3px solid rgba(139,92,246,0.5); }
.rule-num {
  font-size: 1.4rem; font-weight: 700; font-family: 'Merriweather', serif;
  color: var(--text-3); flex-shrink: 0; width: 36px; text-align: center;
  margin-top: 0.1rem;
}
.rule-card-critical .rule-num { color: var(--danger); }
.rule-body { flex: 1; min-width: 0; }
.rule-body h2 { font-size: 1rem; margin-bottom: 0.55rem; color: var(--text-1); }
.rule-body p { font-size: 0.875rem; color: var(--text-2); line-height: 1.75; margin-bottom: 0.5rem; }
.rule-body p:last-child { margin-bottom: 0; }
.rule-body ul { padding-left: 1.25rem; color: var(--text-2); line-height: 1.85; font-size: 0.875rem; margin-bottom: 0.5rem; }
.rule-card-critical .rule-body h2 { color: var(--danger); }
.rule-penalty { color: var(--danger) !important; font-size: 0.82rem !important; }

/* Sidebar cards */
.static-sidebar { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 5rem; }
.static-side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.static-side-header {
  padding: 0.65rem 1rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

/* About: stats */
.static-side-body { padding: 0.75rem 1rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.static-stat-row { display: flex; flex-direction: column; align-items: center; flex: 1; }
.static-stat-num { font-size: 1.3rem; font-weight: 700; color: var(--accent); font-family: 'Merriweather', serif; line-height: 1.2; }
.static-stat-label { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* About: values list */
.static-values-list {
  list-style: none; padding: 0.5rem 0; margin: 0;
  display: flex; flex-direction: column;
}
.static-values-list li {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 1rem; font-size: 0.845rem; color: var(--text-2);
  border-bottom: 1px solid var(--border-2);
}
.static-values-list li:last-child { border-bottom: none; }
.values-icon { font-size: 1rem; flex-shrink: 0; }

/* Shared links list */
.static-links-list { list-style: none; padding: 0; margin: 0; }
.static-links-list li { border-bottom: 1px solid var(--border-2); }
.static-links-list li:last-child { border-bottom: none; }
.static-links-list a { display: block; padding: 0.5rem 1rem; font-size: 0.845rem; color: var(--text-2); transition: color 0.1s, background 0.1s; }
.static-links-list a:hover { color: var(--text-1); background: rgba(255,255,255,0.04); }

/* Rules: TOC nav */
.toc-nav { display: flex; flex-direction: column; }
.toc-link {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 1rem; font-size: 0.82rem; color: var(--text-2);
  border-bottom: 1px solid var(--border-2);
  transition: color 0.1s, background 0.1s; text-decoration: none;
}
.toc-link:last-child { border-bottom: none; }
.toc-link:hover { color: var(--text-1); background: rgba(255,255,255,0.04); }
.toc-link-critical { color: #e07070; }
.toc-link-critical:hover { color: var(--danger); }
.toc-num {
  font-size: 0.72rem; font-weight: 700; color: var(--text-3);
  width: 20px; flex-shrink: 0; text-align: center;
}
.toc-link-critical .toc-num { color: var(--danger); }

/* Mobile */
@media (max-width: 860px) {
  .static-cols { grid-template-columns: 1fr; }
  .static-sidebar { position: static; }
  /* On mobile show TOC above rules compactly */
  .rules-toc { order: -1; }
}

@media (max-width: 600px) {
  .static-hero-banner { padding: 1.5rem 1.25rem; }
  .static-hero-icon { font-size: 1.75rem; }
  .static-hero-banner h1 { font-size: 1.35rem; }
  .static-card { padding: 1.1rem; gap: 0.75rem; }
  .static-card-icon { font-size: 1.2rem; }
  .rule-card { padding: 1.1rem; gap: 0.875rem; }
  .rule-num { font-size: 1.1rem; width: 28px; }
  .static-side-body { flex-direction: column; gap: 0; padding: 0; }
  .static-stat-row { flex-direction: row; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border-2); }
  .static-stat-num { font-size: 1.1rem; }
}

/* ---- Error ---- */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.error-page h1 { margin-bottom: 0.4rem; }
.error-page p { color: var(--text-3); margin-bottom: 1.25rem; font-size: 0.875rem; }

/* ---- Empty State ---- */
.empty-state { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.empty-icon { font-size: 1.75rem; margin-bottom: 0.6rem; }
.empty-state h3 { margin-bottom: 0.35rem; font-family: 'Inter', sans-serif; font-size: 0.95rem; }
.empty-state p { color: var(--text-3); margin-bottom: 1rem; font-size: 0.845rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--header-bg);
  color: var(--text-3);
  padding: 2rem 0 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.footer-inner { display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-mission strong { color: var(--text-2); display: block; margin-bottom: 0.35rem; font-size: 0.845rem; font-weight: 600; }
.footer-mission p { font-size: 0.775rem; line-height: 1.65; max-width: 380px; color: var(--text-3); }
.footer-links { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-links a { color: var(--text-3); font-size: 0.82rem; }
.footer-links a:hover { color: var(--text-2); }
.footer-bottom { border-top: 1px solid var(--border-2); padding-top: 0.875rem; font-size: 0.72rem; color: var(--text-3); text-align: center; }

/* ---- Section heading (used in category view) ---- */
.section-heading { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 0.875rem; font-family: 'Inter', sans-serif; font-weight: 600; }

/* ---- Poll ---- */
.poll-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.poll-question { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.875rem; color: var(--text-1); }
.poll-form .poll-options { display: flex; flex-direction: column; gap: 0.5rem; }
.poll-option-label { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.875rem; color: var(--text-2); padding: 0.4rem 0.6rem; border-radius: var(--radius); transition: background 0.1s; }
.poll-option-label:hover { background: var(--surface-2); color: var(--text-1); }
.poll-option-label input { accent-color: var(--accent); cursor: pointer; }
.poll-results { display: flex; flex-direction: column; gap: 0.6rem; }
.poll-result-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0.75rem; }
.poll-result-label { font-size: 0.875rem; color: var(--text-2); display: flex; align-items: center; gap: 0.4rem; }
.poll-result-bar-wrap { width: 140px; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.poll-result-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.poll-result-pct { font-size: 0.78rem; color: var(--text-3); white-space: nowrap; min-width: 70px; text-align: right; }
.poll-result-voted .poll-result-label { color: var(--text-1); font-weight: 500; }
.poll-result-voted .poll-result-bar { background: var(--accent-dark); }
.poll-voted-mark { color: var(--accent); font-size: 0.75rem; }
.poll-total { margin-top: 0.875rem; font-size: 0.78rem; color: var(--text-3); }

/* ---- Post Signature ---- */
.post-signature {
  margin-top: 1rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border-2);
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* ---- Profile + Settings mobile ---- */
@media (max-width: 860px) {
  /* Profile: stack sidebar below main */
  .profile-cols { grid-template-columns: 1fr; }
  /* Settings: stack sidebar below form */
  .settings-cols { grid-template-columns: 1fr; }
  .settings-sidebar { position: static; }
}

@media (max-width: 640px) {
  /* Cover shorter on mobile */
  .profile-cover { height: 110px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

  /* Identity bar: tighter on small screens */
  .profile-identity { padding: 0 1rem 1rem; gap: 0.875rem; }
  .profile-identity-avatar { margin-top: -32px; }
  .profile-big-avatar { width: 72px; height: 72px; }
  .profile-big-avatar-ph { font-size: 1.75rem; }
  .profile-identity-name h1 { font-size: 1.15rem; }
  .profile-identity-meta { font-size: 0.78rem; }

  /* Thread rows in profile: hide the right-side stats */
  .profile-thread-right { display: none; }

  /* Section padding: reduce on mobile */
  .profile-section-header { padding: 0.65rem 1rem; }
  .profile-thread-row { padding: 0.55rem 1rem; }
  .profile-post-row { padding: 0.65rem 1rem; }
  .profile-comment { padding: 0.75rem 1rem; }
  .profile-comment-form { padding: 0.75rem 1rem; }
  .profile-stat-row { padding: 0.4rem 0.875rem; }
  .profile-forum-row { padding: 0.4rem 0.875rem; }
  .profile-card-body { padding: 0.25rem 0; }

  /* Poll results bar narrower */
  .poll-result-bar-wrap { width: 90px; }
  .poll-result-row { grid-template-columns: 1fr auto auto; gap: 0.5rem; }

  /* Settings section: reduce padding */
  .settings-section { padding: 1.1rem; }
  .settings-toggle-row { grid-template-columns: 1fr auto; gap: 0 0.75rem; }

  /* Main content padding */
  .main-content { padding: 1rem 1rem 1.5rem; }
  .anti-bowfishing-banner { padding: 0.38rem 1rem; font-size: 0.8rem; }
}
