/* ============================================================
   C.S.F — Community Board  |  style.css  v2
   Plain Black Dark Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg: #000000;
  --bg-rgb: 0, 0, 0;
  --surface-rgb: 15, 15, 15;
  --inverse-rgb: 255, 255, 255;
  --text-bright: #ffffff;

  --surface: #0a0a0a;
  --surface-2: #121212;
  --surface-3: #1a1a1a;
  --border: #2a2a2a;
  --border-dim: #1a1a1a;

  --accent: #ffffff;
  --accent-dim: #bbbbbb;
  --accent-glow: rgba(255, 255, 255, 0.12);
  --accent-glow-s: rgba(255, 255, 255, 0.25);
  --accent-rgb: 255, 255, 255;

  --highlight: #ffffff;
  --highlight-dim: #aaaaaa;
  --highlight-glow: rgba(255, 255, 255, 0.18);
  --highlight-rgb: 255, 255, 255;

  --accent-green: #00ff00;
  --green-glow: rgba(0, 255, 0, 0.20);
  --accent-green-rgb: 0, 255, 0;

  --cat-cyan: #3b82f6;
  --cat-cyan-rgb: 59, 130, 246;
  --cat-purple: #a855f7;
  --cat-purple-rgb: 168, 85, 247;
  --cat-green: #00e5a0;
  --cat-green-rgb: 0, 229, 160;
  --cat-red: #ef3a4b;
  --cat-red-rgb: 239, 58, 75;
  --cat-gold: #facc15;
  --cat-gold-rgb: 250, 204, 21;
  --cat-orange: #ff7a00;
  --cat-orange-rgb: 255, 122, 0;

  --hero-accent: #ffffff;
  --hero-accent-rgb: 255, 255, 255;
  --hero-secondary-rgb: 255, 255, 255;
  --hero-tertiary-rgb: 255, 255, 255;

  --steel: #888888;
  --text: #e0e0e0;
  --text-muted: #666666;
  --text-dim: #444444;
  --danger: #ff4444;
  --warn: #ffcc00;
  --hero-bg: linear-gradient(180deg, #000000 0%, #000000 100%);
  --hero-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.30) 56%, rgba(0, 0, 0, 0.92) 100%);

  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 62px;
  --nav-offset: 62px;
  --mobile-tabs-h: 0px;
  --mono: 'JetBrains Mono', monospace;
}

:root[data-theme="light"] {
  --bg: #f0f0f0;
  --bg-rgb: 240, 240, 240;
  --surface-rgb: 255, 255, 255;
  --inverse-rgb: 0, 0, 0;
  --text-bright: #000000;

  --surface: #ffffff;
  --surface-2: #e8e8e8;
  --surface-3: #d0d0d0;
  --border: #c0c0c0;
  --border-dim: #e0e0e0;

  --accent: #333333;
  --accent-dim: #666666;
  --accent-glow: rgba(51, 51, 51, 0.14);
  --accent-glow-s: rgba(51, 51, 51, 0.26);
  --accent-rgb: 51, 51, 51;

  --highlight: #333333;
  --highlight-dim: #999999;
  --highlight-glow: rgba(51, 51, 51, 0.20);
  --highlight-rgb: 51, 51, 51;

  --accent-green: #006600;
  --green-glow: rgba(0, 102, 0, 0.20);
  --accent-green-rgb: 0, 102, 0;

  --cat-cyan: #1d4ed8;
  --cat-cyan-rgb: 29, 78, 216;
  --cat-purple: #7e22ce;
  --cat-purple-rgb: 126, 34, 206;
  --cat-green: #0a8a5f;
  --cat-green-rgb: 10, 138, 95;
  --cat-red: #a01322;
  --cat-red-rgb: 160, 19, 34;
  --cat-gold: #b58900;
  --cat-gold-rgb: 181, 137, 0;
  --cat-orange: #ff7a00;
  --cat-orange-rgb: 255, 122, 0;

  --hero-accent: #333333;
  --hero-accent-rgb: 51, 51, 51;
  --hero-secondary-rgb: 51, 51, 51;
  --hero-tertiary-rgb: 51, 51, 51;

  --steel: #555555;
  --text: #1a1a1a;
  --text-muted: #888888;
  --text-dim: #aaaaaa;
  --danger: #cc0000;
  --warn: #cc9900;
  --hero-bg: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  --hero-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 58%, rgba(240, 240, 240, 0.72) 100%);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

:root[data-theme="light"] html {
  color-scheme: light;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* subtle scanline */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.04) 3px, rgba(0, 0, 0, 0.04) 4px);
}

:root[data-theme="light"] body::after {
  opacity: 0.22;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .intel-ticker-inner,
  .hero-btn-pulse::before,
  .hft {
    animation: none !important;
  }
}

/* ── NAV ──────────────────────────────────────────────────── */
#topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--nav-h);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0 2rem;
  background: rgba(var(--bg-rgb), 0.94);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 40px var(--accent-glow);
  gap: 0.5rem;
  overflow: hidden;
}

.nav-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  z-index: 1;
  -webkit-user-select: none;
  user-select: none;
}

.brand-glyph {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--mono);
  text-shadow: 0 0 16px var(--accent-glow-s);
  letter-spacing: -2px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.5px;
}

.brand-one {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

.nav-links {
  display: flex;
  gap: 0;
  align-items: center;
  z-index: 1;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 1;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: visible;
  margin-left: auto;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  line-height: 1;
}

.nav-icon-btn svg {
  display: block;
}

.nav-user-callsign,
.nav-user-rank {
  white-space: nowrap;
}

.nav-logout-btn {
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .nav-right .nav-user-callsign,
  .nav-right .nav-user-rank,
  .nav-right .btn:not(.nav-icon-btn):not(.mobile-menu-btn) {
    display: none;
  }
}

.mobile-menu-btn {
  display: none;
}

.mobile-nav-modal {
  width: min(100%, 420px);
}

.mobile-nav-title {
  margin-bottom: 1rem;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mobile-nav-link,
.mobile-nav-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-nav-link:hover,
.mobile-nav-action:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.mobile-nav-section-label {
  margin: 1.25rem 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.mobile-nav-user {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.04));
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: var(--radius);
}

.mobile-nav-user-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.mobile-nav-user-tier {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
}

.btn-primary {
  background: var(--accent);
  color: #05070a;
  box-shadow: 0 0 18px var(--accent-glow-s);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, white);
  box-shadow: 0 0 30px var(--accent-glow-s);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.btn-purple {
  background: var(--highlight);
  color: #221106;
  box-shadow: 0 0 18px var(--highlight-glow);
}

.btn-purple:hover {
  background: color-mix(in srgb, var(--highlight) 85%, white);
  transform: translateY(-1px);
}

/* ── HERO RESTORE POINT (pre-space theme) ─────────────────
   --hero-bg (dark):    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.13) 0%, transparent 34%), radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.10) 0%, transparent 28%), linear-gradient(180deg, #0d1117 0%, #05070a 100%)
   --hero-overlay (dark): linear-gradient(180deg, rgba(5, 7, 10, 0.08) 0%, rgba(5, 7, 10, 0.38) 56%, rgba(5, 7, 10, 0.94) 100%)
   .hero-orb-1 bg:      radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%)
   .hero-orb-2 bg:      radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%)
   .hero-orb-3 bg:      radial-gradient(circle, rgba(0, 229, 160, 0.08) 0%, transparent 70%)
.hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  height: auto;
  background: var(--hero-bg);
  margin-top: var(--nav-offset);
  padding: 3.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* Horizontal scanning beam */
.hero-scan-beam {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--hero-accent-rgb), 0.6),
    rgba(var(--hero-accent-rgb), 0.9),
    rgba(var(--hero-accent-rgb), 0.6),
    transparent
  );
  box-shadow:
    0 0 20px rgba(var(--hero-accent-rgb), 0.5),
    0 0 60px rgba(var(--hero-accent-rgb), 0.2);
  z-index: 1;
  pointer-events: none;
  animation: scanBeam 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

:root[data-theme="light"] .hero-scan-beam {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 168, 120, 0.4),
    rgba(0, 168, 120, 0.8),
    rgba(0, 168, 120, 0.4),
    transparent
  );
  box-shadow: 0 0 15px rgba(0, 168, 120, 0.3);
}

@keyframes scanBeam {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Background floating glow orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, rgba(var(--hero-accent-rgb), 0.12) 0%, transparent 70%);
  animation: orbFloat1 18s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  bottom: -80px;
  right: 12%;
  background: radial-gradient(circle, rgba(var(--hero-secondary-rgb), 0.12) 0%, transparent 70%);
  animation: orbFloat2 22s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, transparent 70%);
  animation: orbFloat3 14s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.1); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-50px, -40px) scale(1.15); }
  100% { transform: translate(30px, -20px) scale(0.9); }
}
@keyframes orbFloat3 {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50%  { transform: translate(-45%, -40%) scale(1.2); opacity: 1; }
  100% { transform: translate(-55%, -60%) scale(0.85); opacity: 0.4; }
}

/* Hero overlay content */
.hero-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

/* Typewriter eyebrow */
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--hero-accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-cursor-blink {
  display: inline-block;
  width: 7px;
  height: 0.85em;
  background: var(--hero-accent);
  margin-left: 2px;
  animation: heroBlink 1.1s step-end infinite;
  vertical-align: middle;
}

@keyframes heroBlink {
  50% { opacity: 0; }
}

/* Hero title with title-frame nodes */
.hero-title-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.hero-title {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.hero-brand-line {
  display: block;
  font-size: clamp(1.4rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #4c515b;
  line-height: 1.1;
}

.hero-title-divider {
  width: 64px;
  height: 1px;
  margin: 0.25rem auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
}

.hero-line-1 {
  display: block;
  font-size: clamp(1.0rem, 2.2vw, 1.7rem);
  letter-spacing: 0.12em;
  animation: glitchLine 8s infinite;
  color: var(--text-bright);
}

:root[data-theme="light"] .hero-title {
  color: var(--text-bright);
}

:root[data-theme="light"] .hero-line-2 {
  color: var(--hero-accent);
  text-shadow: none;
}

.hero-title-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hero-accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 14px rgba(var(--hero-accent-rgb), 0.9);
  animation: heroNodeBlink 1.8s steps(2, end) infinite;
}

.hero-node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(var(--hero-accent-rgb), 0.18);
}

.hero-node-1 { top: 18px; left: 18px; animation-delay: 0s; }
.hero-node-2 { top: 18px; right: 18px; animation-delay: 0.35s; }
.hero-node-3 { bottom: 18px; left: 18px; animation-delay: 0.7s; }
.hero-node-4 { bottom: 18px; right: 18px; animation-delay: 1.05s; }
.hero-node-5 { top: calc(50% - 4px); left: -4px; animation-delay: 1.4s; }
.hero-node-6 { top: calc(50% - 4px); right: -4px; animation-delay: 1.7s; }

@keyframes heroNodeBlink {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes accentPulse {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(var(--hero-accent-rgb), 0.18);
  }

  50% {
    text-shadow: 0 0 42px rgba(var(--hero-accent-rgb), 0.32), 0 0 80px rgba(var(--hero-secondary-rgb), 0.12);
  }
}

@keyframes glitchLine {

  0%,
  90%,
  100% {
    transform: translate(0);
    clip-path: none;
  }

  91% {
    transform: translate(-3px, 1px);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  }

  92% {
    transform: translate(3px, -1px);
    clip-path: none;
  }

  93% {
    transform: translate(-2px, 0);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  }

  94% {
    transform: translate(0);
    clip-path: none;
  }
}

@keyframes glitchAccent {

  0%,
  88%,
  100% {
    transform: translate(0);
  }

  89% {
    transform: translate(4px, -2px);
    filter: saturate(1.05);
  }

  90% {
    transform: translate(-4px, 1px);
    filter: saturate(0.95);
  }

  91% {
    transform: translate(0);
    filter: none;
  }
}

/* Hero CTA pulse ring */
.hero-btn-pulse {
  position: relative;
}

.hero-btn-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulseRing 2.5s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--steel);
  max-width: 520px;
  margin-bottom: 1.5rem;
  line-height: 1.65;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Floating ambient data tags */
.hft {
  position: absolute;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  pointer-events: none;
  font-weight: 800;
  text-shadow: 0 0 10px var(--accent-glow-s);
  animation: hftFloat 6s ease-in-out infinite, hftGlow 3s ease-in-out infinite;
}

.hft-1 {
  top: 18%;
  left: 6%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.hft-2 {
  top: 35%;
  right: 5%;
  animation-delay: 1.5s;
  animation-duration: 9s;
  color: var(--highlight);
  text-shadow: 0 0 10px var(--highlight-glow);
}

.hft-3 {
  bottom: 22%;
  left: 8%;
  animation-delay: 3s;
  animation-duration: 6s;
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--green-glow);
}

.hft-4 {
  top: 60%;
  right: 9%;
  animation-delay: 2s;
  animation-duration: 8s;
}

.hft-5 {
  top: 12%;
  right: 18%;
  animation-delay: 4s;
  animation-duration: 10s;
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--green-glow);
}

.hft-6 {
  bottom: 30%;
  right: 25%;
  animation-delay: 1s;
  animation-duration: 7.5s;
  color: var(--highlight);
  text-shadow: 0 0 10px var(--highlight-glow);
}

@keyframes hftFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.5;
  }

  33% {
    transform: translateY(-15px) translateX(8px) scale(1.1);
    opacity: 0.9;
  }

  66% {
    transform: translateY(10px) translateX(-6px) scale(0.95);
    opacity: 0.4;
  }
}

@keyframes hftGlow {

  0%,
  100% {
    filter: brightness(1) blur(0px);
  }

  50% {
    filter: brightness(1.5) blur(0.5px);
  }
}

/* ── HERO DIVIDER ─────────────────────────────────────────── */
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  height: 60px;
}

.hero-divider-line {
  flex: 1;
  height: 1px;
}

.left-line {
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.5) 100%);
}

.right-line {
  background: linear-gradient(270deg, transparent, rgba(var(--accent-rgb), 0.5) 100%);
}

.hero-divider-text {
  padding: 0 2rem;
  font-size: clamp(0.7rem, 2vw, 1.1rem);
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--text-bright);
  line-height: 1;
  white-space: nowrap;
}

.hero-divider-text .hero-divider-p1 {
  display: inline-block;
  margin-right: 0.5rem;
  animation: glitchLine 8s infinite;
}

.hero-divider-text .hero-divider-p2 {
  display: inline-block;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.24);
  animation: accentPulse 3s ease-in-out infinite, glitchAccent 8s infinite 1.5s;
}

:root[data-theme="light"] .hero-divider-text .hero-divider-p2 {
  color: var(--highlight);
  text-shadow: none;
}

/* ── MISSION BAR ────────────────────────────────────────── */
.mission-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.mission-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mission-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--cat-cyan);
  letter-spacing: 0.15em;
  font-weight: 700;
}

.mission-tag-cyan {
  color: var(--cat-cyan);
}

.mission-tag-purple {
  color: var(--cat-purple);
}

.mission-tag-green {
  color: var(--cat-green);
}

.mission-tag-red {
  color: var(--cat-red);
}

.mission-tag-gold {
  color: var(--cat-gold);
}

.mission-tag-orange {
  color: var(--cat-orange);
}

.mission-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.mission-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .mission-bar {
    padding: 2.5rem 0;
  }

  .mission-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── FEATURED: OPTIX AI ────────────────────────────────────── */
.feature-band,
.manifesto-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-band {
  padding: 1.5rem 2rem;
  background: var(--hero-bg);
}

.topintel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.topintel-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.topintel-title {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  text-transform: uppercase;
  margin: 0;
}
.topintel-all {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}
.topintel-all:hover { color: var(--text-bright); }
.topintel-card { position: relative; z-index: 1; }
.topintel-cat { margin-bottom: 0.7rem; }
.topintel-loading,
.news-empty {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.feature-band::before,
.manifesto-band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), 0.04) 50%, transparent 100%);
  opacity: 0.7;
}

.feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.feature-kicker,
.manifesto-kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1rem;
  line-height: 1.08;
}

.feature-title-gradient {
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-copy,
.manifesto-copy {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-points {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.feature-point {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-green);
}

.feature-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-panel {
  position: relative;
  z-index: 1;
  background: rgba(var(--surface-rgb), 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.feature-panel-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list-item {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.feature-list-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.08);
}

.feature-list-item:nth-child(2) .feature-list-icon {
  border-color: rgba(var(--highlight-rgb), 0.28);
  background: rgba(var(--highlight-rgb), 0.1);
}

.feature-list-item:nth-child(3) .feature-list-icon {
  border-color: rgba(var(--accent-green-rgb), 0.28);
  background: rgba(var(--accent-green-rgb), 0.1);
}

.feature-list-heading {
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.feature-list-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.manifesto-band {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--hero-bg);
}

.manifesto-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.manifesto-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.manifesto-title span {
  color: var(--accent);
}

.manifesto-link {
  border-color: rgba(var(--accent-rgb), 0.35);
}

:root[data-theme="light"] .feature-band {
  background:
    radial-gradient(circle at 80% 20%, rgba(var(--highlight-rgb), 0.12) 0%, transparent 22%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.05) 0%, rgba(var(--highlight-rgb), 0.07) 100%);
}

body.layout-ready .feature-band {
  visibility: visible;
}

:root[data-theme="light"] .feature-panel {
  box-shadow: 0 18px 44px rgba(22, 63, 115, 0.08);
}

:root[data-theme="light"] .btn-primary {
  color: #ffffff;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}


/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3rem 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 580px;
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

/* ── CATEGORY CARDS — horizontal stack ─────────────────────── */
.cat-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 0;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
}

.cat-card:hover {
  transform: translateY(-3px);
}

.cat-card-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 140px;
}

/* left accent strip */
.cat-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.75rem;
  min-width: 110px;
  border-right: 1px solid var(--border-dim);
  background: rgba(var(--bg-rgb), 0.4);
}

.cat-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.25em;
}

.cat-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.cat-card:hover .cat-icon-wrap {
  transform: scale(1.08);
}

.cat-icon-wrap-cyan {
  background: rgba(var(--cat-cyan-rgb), 0.1);
  border: 1px solid rgba(var(--cat-cyan-rgb), 0.25);
  color: var(--cat-cyan);
}

.cat-icon-wrap-purple {
  background: rgba(var(--cat-purple-rgb), 0.1);
  border: 1px solid rgba(var(--cat-purple-rgb), 0.25);
  color: var(--cat-purple);
}

.cat-icon-wrap-green {
  background: rgba(var(--cat-green-rgb), 0.1);
  border: 1px solid rgba(var(--cat-green-rgb), 0.25);
  color: var(--cat-green);
}

.cat-icon-wrap-red {
  background: rgba(var(--cat-red-rgb), 0.1);
  border: 1px solid rgba(var(--cat-red-rgb), 0.25);
  color: var(--cat-red);
}

.cat-icon-wrap-gold {
  background: rgba(var(--cat-gold-rgb), 0.1);
  border: 1px solid rgba(var(--cat-gold-rgb), 0.25);
  color: var(--cat-gold);
}

.cat-icon-wrap-orange {
  background: rgba(var(--cat-orange-rgb), 0.1);
  border: 1px solid rgba(var(--cat-orange-rgb), 0.25);
  color: var(--cat-orange);
}

.cat-card:hover .cat-icon-wrap-cyan {
  box-shadow: 0 0 22px rgba(var(--cat-cyan-rgb), 0.35);
}

.cat-card:hover .cat-icon-wrap-purple {
  box-shadow: 0 0 22px rgba(var(--cat-purple-rgb), 0.35);
}

.cat-card:hover .cat-icon-wrap-green {
  box-shadow: 0 0 22px rgba(var(--cat-green-rgb), 0.35);
}

.cat-card:hover .cat-icon-wrap-red {
  box-shadow: 0 0 22px rgba(var(--cat-red-rgb), 0.35);
}

.cat-card:hover .cat-icon-wrap-gold {
  box-shadow: 0 0 22px rgba(var(--cat-gold-rgb), 0.35);
}

.cat-card:hover .cat-icon-wrap-orange {
  box-shadow: 0 0 22px rgba(var(--cat-orange-rgb), 0.35);
}

/* body */
.cat-card-body {
  flex: 1;
  padding: 1.6rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cat-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cat-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.cat-thread-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  background: rgba(var(--inverse-rgb), 0.03);
  white-space: nowrap;
}

.cat-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

/* subcategory tag pills */
.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid;
  transition: all var(--transition);
  white-space: nowrap;
}

.cat-tag-cyan {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.2);
  background: rgba(var(--cat-cyan-rgb), 0.06);
}

.cat-tag-purple {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.2);
  background: rgba(var(--cat-purple-rgb), 0.06);
}

.cat-tag-green {
  color: var(--cat-green);
  border-color: rgba(var(--cat-green-rgb), 0.2);
  background: rgba(var(--cat-green-rgb), 0.06);
}

.cat-tag-red {
  color: var(--cat-red);
  border-color: rgba(var(--cat-red-rgb), 0.2);
  background: rgba(var(--cat-red-rgb), 0.06);
}

.cat-tag-gold {
  color: var(--cat-gold);
  border-color: rgba(var(--cat-gold-rgb), 0.2);
  background: rgba(var(--cat-gold-rgb), 0.06);
}

.cat-tag-orange {
  color: var(--cat-orange);
  border-color: rgba(var(--cat-orange-rgb), 0.2);
  background: rgba(var(--cat-orange-rgb), 0.06);
}

.cat-card:hover .cat-tag-cyan {
  border-color: rgba(var(--cat-cyan-rgb), 0.4);
  background: rgba(var(--cat-cyan-rgb), 0.1);
}

.cat-card:hover .cat-tag-purple {
  border-color: rgba(var(--cat-purple-rgb), 0.4);
  background: rgba(var(--cat-purple-rgb), 0.1);
}

.cat-card:hover .cat-tag-green {
  border-color: rgba(var(--cat-green-rgb), 0.4);
  background: rgba(var(--cat-green-rgb), 0.1);
}

.cat-card:hover .cat-tag-red {
  border-color: rgba(var(--cat-red-rgb), 0.4);
  background: rgba(var(--cat-red-rgb), 0.1);
}

.cat-card:hover .cat-tag-gold {
  border-color: rgba(var(--cat-gold-rgb), 0.4);
  background: rgba(var(--cat-gold-rgb), 0.1);
}

.cat-card:hover .cat-tag-orange {
  border-color: rgba(var(--cat-orange-rgb), 0.4);
  background: rgba(var(--cat-orange-rgb), 0.1);
}

/* right arrow */
.cat-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  font-size: 1.3rem;
  color: var(--text-dim);
  transition: color var(--transition), transform var(--transition);
  border-left: 1px solid var(--border-dim);
  background: rgba(var(--bg-rgb), 0.2);
}

.cat-card:hover .cat-card-arrow {
  transform: translateX(4px);
}

.cat-cyan:hover .cat-card-arrow {
  color: var(--cat-cyan);
}

.cat-purple:hover .cat-card-arrow {
  color: var(--cat-purple);
}

.cat-green:hover .cat-card-arrow {
  color: var(--cat-green);
}

.cat-red:hover .cat-card-arrow {
  color: var(--cat-red);
}

.cat-gold:hover .cat-card-arrow {
  color: var(--cat-gold);
}

.cat-orange:hover .cat-card-arrow {
  color: var(--cat-orange);
}

/* left border colour glow */
.cat-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 0;
}

.cat-cyan .cat-glow {
  background: var(--cat-cyan);
  box-shadow: 2px 0 16px rgba(var(--cat-cyan-rgb), 0.4);
}

.cat-purple .cat-glow {
  background: var(--cat-purple);
  box-shadow: 2px 0 16px rgba(var(--cat-purple-rgb), 0.4);
}

.cat-green .cat-glow {
  background: var(--cat-green);
  box-shadow: 2px 0 16px rgba(var(--cat-green-rgb), 0.4);
}

.cat-red .cat-glow {
  background: var(--cat-red);
  box-shadow: 2px 0 16px rgba(var(--cat-red-rgb), 0.4);
}

.cat-gold .cat-glow {
  background: var(--cat-gold);
  box-shadow: 2px 0 16px rgba(var(--cat-gold-rgb), 0.4);
}

.cat-orange .cat-glow {
  background: var(--cat-orange);
  box-shadow: 2px 0 16px rgba(var(--cat-orange-rgb), 0.4);
}

.cat-cyan {
  border-color: rgba(var(--cat-cyan-rgb), 0.15);
}

.cat-purple {
  border-color: rgba(var(--cat-purple-rgb), 0.15);
}

.cat-green {
  border-color: rgba(var(--cat-green-rgb), 0.15);
}

.cat-red {
  border-color: rgba(var(--cat-red-rgb), 0.15);
}

.cat-gold {
  border-color: rgba(var(--cat-gold-rgb), 0.15);
}

.cat-orange {
  border-color: rgba(var(--cat-orange-rgb), 0.15);
}

.cat-cyan:hover {
  border-color: rgba(var(--cat-cyan-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-cyan-rgb), 0.15);
}

.cat-purple:hover {
  border-color: rgba(var(--cat-purple-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-purple-rgb), 0.15);
}

.cat-green:hover {
  border-color: rgba(var(--cat-green-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-green-rgb), 0.15);
}

.cat-red:hover {
  border-color: rgba(var(--cat-red-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-red-rgb), 0.15);
}

.cat-gold:hover {
  border-color: rgba(var(--cat-gold-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-gold-rgb), 0.15);
}

.cat-orange:hover {
  border-color: rgba(var(--cat-orange-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--cat-orange-rgb), 0.15);
}

/* ── ACTIVITY FEED ────────────────────────────────────────── */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.activity-row:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-cyan {
  background: var(--cat-cyan);
  box-shadow: 0 0 6px var(--cat-cyan);
}

.dot-purple {
  background: var(--cat-purple);
  box-shadow: 0 0 6px var(--cat-purple);
}

.dot-green {
  background: var(--cat-green);
  box-shadow: 0 0 6px var(--cat-green);
}

.dot-red {
  background: var(--cat-red);
  box-shadow: 0 0 6px var(--cat-red);
}

.dot-gold {
  background: var(--cat-gold);
  box-shadow: 0 0 6px var(--cat-gold);
}

.dot-orange {
  background: var(--cat-orange);
  box-shadow: 0 0 6px var(--cat-orange);
}

.activity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.activity-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.activity-confirms {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cat-badge-cyan {
  color: var(--cat-cyan);
}

.cat-badge-purple {
  color: var(--cat-purple);
}

.cat-badge-green {
  color: var(--cat-green);
}

.cat-badge-red {
  color: var(--cat-red);
}

.cat-badge-gold {
  color: var(--cat-gold);
}

.cat-badge-orange {
  color: var(--cat-orange);
}

/* ── BOARD LAYOUT ─────────────────────────────────────────── */
.board-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--nav-offset));
  padding-top: var(--nav-offset);
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: var(--nav-offset);
  height: calc(100vh - var(--nav-offset));
}

.go-to-hub-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.04));
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.go-to-hub-btn:hover {
  background: rgba(var(--accent-rgb), 0.22);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 0 18px rgba(var(--accent-rgb), 0.18);
}

.go-to-hub-btn .go-to-hub-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.go-to-hub-btn .go-to-hub-label {
  white-space: nowrap;
}

.panel {
  border-bottom: 1px solid var(--border);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(var(--bg-rgb), 0.55);
  border-bottom: 1px solid var(--border-dim);
}

.panel-title {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.panel-status {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

.online-count {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-green);
  text-shadow: 0 0 14px var(--green-glow);
  font-family: var(--mono);
}

.online-label {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--text-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pbar-track {
  height: 3px;
  background: #111;
  flex: 1;
  border-radius: 2px;
}

.pbar-fill {
  height: 100%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  transition: width 0.6s;
  border-radius: 2px;
}

/* Category group headers in sidebar */
.sidebar-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-bright);

  background: rgba(var(--bg-rgb), 0.3);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color var(--transition);
  border-left: 2px solid transparent;
}

.sidebar-cat-header-cyan {
  color: var(--cat-cyan);
  border-left-color: rgba(var(--cat-cyan-rgb), 0.45);
}

.sidebar-cat-header-purple {
  color: var(--cat-purple);
  border-left-color: rgba(var(--cat-purple-rgb), 0.45);
}

.sidebar-cat-header-green {
  color: var(--cat-green);
  border-left-color: rgba(var(--cat-green-rgb), 0.45);
}

.sidebar-cat-header-red {
  color: var(--cat-red);
  border-left-color: rgba(var(--cat-red-rgb), 0.45);
}

.sidebar-cat-header-gold {
  color: var(--cat-gold);
  border-left-color: rgba(var(--cat-gold-rgb), 0.45);
}

.sidebar-cat-header-orange {
  color: var(--cat-orange);
  border-left-color: rgba(var(--cat-orange-rgb), 0.45);
}

.sidebar-cat-header-cyan .sidebar-cat-dot-cyan,
.sidebar-cat-header-purple .sidebar-cat-dot-purple,
.sidebar-cat-header-green .sidebar-cat-dot-green,
.sidebar-cat-header-red .sidebar-cat-dot-red,
.sidebar-cat-header-gold .sidebar-cat-dot-gold,
.sidebar-cat-header-orange .sidebar-cat-dot-orange {
  opacity: 1;
}

.sidebar-cat-header:hover {
  color: var(--text-muted);
}

.sidebar-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-cat-dot-cyan {
  background: var(--cat-cyan);
  box-shadow: 0 0 5px var(--cat-cyan);
}

.sidebar-cat-dot-purple {
  background: var(--cat-purple);
  box-shadow: 0 0 5px var(--cat-purple);
}

.sidebar-cat-dot-green {
  background: var(--cat-green);
  box-shadow: 0 0 5px var(--cat-green);
}

.sidebar-cat-dot-red {
  background: var(--cat-red);
  box-shadow: 0 0 5px var(--cat-red);
}

.sidebar-cat-dot-gold {
  background: var(--cat-gold);
  box-shadow: 0 0 5px var(--cat-gold);
}

.sidebar-cat-dot-orange {
  background: var(--cat-orange);
  box-shadow: 0 0 5px var(--cat-orange);
}

/* Channel list items */
.channel-list {
  list-style: none;
  margin-bottom: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
}

.channel-list::-webkit-scrollbar {
  width: 4px;
}

.channel-list::-webkit-scrollbar-track {
  background: transparent;
}

.channel-list::-webkit-scrollbar-thumb {
  background: rgba(var(--inverse-rgb), 0.1);
  border-radius: 4px;
}

.channel-list::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--inverse-rgb), 0.2);
}

.channel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px 9px 28px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(var(--surface-rgb), 0.8);
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
  position: relative;
}

.channel-item::before {
  content: '#';
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  opacity: 0.4;
  font-size: 0.6rem;
  transition: color var(--transition), opacity var(--transition);
}

.channel-item:hover {
  color: var(--text-muted);
  background: rgba(var(--inverse-rgb), 0.05);
}

.channel-item:hover::before {
  color: var(--accent);
  opacity: 0.7;
}

.channel-item.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--accent);
  padding-left: 26px;
}

.channel-item.active::before {
  color: var(--accent);
  opacity: 1;
}

.channel-item.ch-cyan.active {
  color: var(--cat-cyan);
  border-left-color: var(--cat-cyan);
  background: rgba(255, 255, 255, 0.06);
}

.channel-item.ch-cyan.active::before {
  color: var(--cat-cyan);
}

.channel-item.ch-cyan:hover {
  color: var(--cat-cyan);
}

.channel-item.ch-purple.active {
  color: var(--cat-purple);
  border-left-color: var(--cat-purple);
  background: rgba(var(--cat-purple-rgb), 0.06);
}

.channel-item.ch-purple.active::before {
  color: var(--cat-purple);
}

.channel-item.ch-purple:hover {
  color: var(--cat-purple);
}

.channel-item.ch-green.active {
  color: var(--cat-green);
  border-left-color: var(--cat-green);
  background: rgba(var(--cat-green-rgb), 0.06);
}

.channel-item.ch-green.active::before {
  color: var(--cat-green);
}

.channel-item.ch-green:hover {
  color: var(--cat-green);
}

.channel-item.ch-red.active {
  color: var(--cat-red);
  border-left-color: var(--cat-red);
  background: rgba(var(--cat-red-rgb), 0.06);
}

.channel-item.ch-red.active::before {
  color: var(--cat-red);
}

.channel-item.ch-red:hover {
  color: var(--cat-red);
}

.channel-item.ch-gold.active {
  color: var(--cat-gold);
  border-left-color: var(--cat-gold);
  background: rgba(var(--cat-gold-rgb), 0.06);
}

.channel-item.ch-gold.active::before {
  color: var(--cat-gold);
}

.channel-item.ch-gold:hover {
  color: var(--cat-gold);
}

.channel-item.ch-orange.active {
  color: var(--cat-orange);
  border-left-color: var(--cat-orange);
  background: rgba(var(--cat-orange-rgb), 0.06);
}

.channel-item.ch-orange.active::before {
  color: var(--cat-orange);
}

.channel-item.ch-orange:hover {
  color: var(--cat-orange);
}

.channel-item.ch-cyan.glowing-channel {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15), 0 0 8px rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.channel-item.ch-cyan.glowing-channel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.channel-item.ch-cyan.glowing-channel::before {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.channel-count {
  font-size: 0.64rem;
  color: var(--text-dim);
  background: rgba(var(--inverse-rgb), 0.06);
  border-radius: 10px;
  padding: 1px 6px;
  border: 1px solid var(--border-dim);
}

.channel-item.active .channel-count {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--accent);
}

/* Glowing General Channels */
.channel-item.glowing-channel {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15), 0 0 8px rgba(255, 255, 255, 0.1);
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.channel-item.glowing-channel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.channel-item.glowing-channel::before {
  content: '⚲';
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 8px var(--accent-glow);
  font-size: 0.9rem;
  left: 11px;
}

.channel-item.ch-purple.glowing-channel {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15), 0 0 8px rgba(255, 255, 255, 0.1);
  border-left-color: var(--cat-purple);
  background: rgba(255, 255, 255, 0.08);
}

.channel-item.ch-purple.glowing-channel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.channel-item.ch-purple.glowing-channel::before {
  color: var(--cat-purple);
  text-shadow: 0 0 8px var(--cat-purple);
}

.channel-item.ch-green.glowing-channel {
  box-shadow: inset 0 0 12px rgba(0, 229, 160, 0.15), 0 0 8px rgba(0, 229, 160, 0.1);
  border-left-color: var(--cat-green);
  background: rgba(0, 229, 160, 0.08);
}

.channel-item.ch-green.glowing-channel:hover {
  background: rgba(0, 229, 160, 0.12);
}

.channel-item.ch-green.glowing-channel::before {
  color: var(--cat-green);
  text-shadow: 0 0 8px var(--cat-green);
}

.channel-item.ch-red.glowing-channel {
  box-shadow: inset 0 0 12px rgba(var(--cat-red-rgb), 0.15), 0 0 8px rgba(var(--cat-red-rgb), 0.1);
  border-left-color: var(--cat-red);
  background: rgba(var(--cat-red-rgb), 0.08);
}

.channel-item.ch-red.glowing-channel:hover {
  background: rgba(var(--cat-red-rgb), 0.12);
}

.channel-item.ch-red.glowing-channel::before {
  color: var(--cat-red);
  text-shadow: 0 0 8px var(--cat-red);
}

.channel-item.ch-gold.glowing-channel {
  box-shadow: inset 0 0 12px rgba(var(--cat-gold-rgb), 0.15), 0 0 8px rgba(var(--cat-gold-rgb), 0.1);
  border-left-color: var(--cat-gold);
  background: rgba(var(--cat-gold-rgb), 0.08);
}

.channel-item.ch-gold.glowing-channel:hover {
  background: rgba(var(--cat-gold-rgb), 0.12);
}

.channel-item.ch-gold.glowing-channel::before {
  color: var(--cat-gold);
  text-shadow: 0 0 8px var(--cat-gold);
}

.channel-item.ch-orange.glowing-channel {
  box-shadow: inset 0 0 12px rgba(var(--cat-orange-rgb), 0.15), 0 0 8px rgba(var(--cat-orange-rgb), 0.1);
  border-left-color: var(--cat-orange);
  background: rgba(var(--cat-orange-rgb), 0.08);
}

.channel-item.ch-orange.glowing-channel:hover {
  background: rgba(var(--cat-orange-rgb), 0.12);
}

.channel-item.ch-orange.glowing-channel::before {
  color: var(--cat-orange);
  text-shadow: 0 0 8px var(--cat-orange);
}


.channel-cat-pill {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-dim);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(var(--inverse-rgb), 0.04);
}

.channel-cat-pill-cyan {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.24);
  background: rgba(var(--cat-cyan-rgb), 0.07);
}

.channel-cat-pill-purple {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.24);
  background: rgba(var(--cat-purple-rgb), 0.07);
}

.channel-cat-pill-green {
  color: var(--cat-green);
  border-color: rgba(var(--cat-green-rgb), 0.24);
  background: rgba(var(--cat-green-rgb), 0.07);
}

.channel-cat-pill-red {
  color: var(--cat-red);
  border-color: rgba(var(--cat-red-rgb), 0.24);
  background: rgba(var(--cat-red-rgb), 0.07);
}

.channel-cat-pill-gold {
  color: var(--cat-gold);
  border-color: rgba(var(--cat-gold-rgb), 0.24);
  background: rgba(var(--cat-gold-rgb), 0.07);
}


/* Category items (top-level) */
.cat-nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-dim);
  transition: color var(--transition), background var(--transition);
}

.cat-nav-item:hover {
  color: var(--text);
  background: rgba(var(--inverse-rgb), 0.05);
}

.cat-nav-item.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}

.cat-nav-item.cat-nav-cyan.active {
  color: var(--cat-cyan);
  background: rgba(255, 255, 255, 0.07);
}

.cat-nav-item.cat-nav-purple.active {
  color: var(--cat-purple);
  background: rgba(var(--cat-purple-rgb), 0.07);
}

.cat-nav-item.cat-nav-green.active {
  color: var(--cat-green);
  background: rgba(var(--cat-green-rgb), 0.07);
}

.cat-nav-item.cat-nav-red.active {
  color: var(--cat-red);
  background: rgba(var(--cat-red-rgb), 0.07);
}

.cat-nav-item.cat-nav-gold.active {
  color: var(--cat-gold);
  background: rgba(var(--cat-gold-rgb), 0.07);
}

.cat-nav-item.cat-nav-orange.active {
  color: var(--cat-orange);
  background: rgba(var(--cat-orange-rgb), 0.07);
}


.cat-nav-count {
  font-size: 0.66rem;
  color: var(--text-dim);
}

/* Tier badges */
.tier-badge {
  font-family: var(--mono);
  font-size: 0.56rem;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
}

.tier-RECRUIT {
  color: #7a9cc4;
  border-color: #1a3255;
}

.tier-OPERATOR {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.35);
}

.tier-SPECIALIST {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.35);
}

.tier-ADMIN {
  color: #ffffff;
  border-color: #7a0022;
}

/* Rank group colours (apply to both .post-tier and .tier-badge) */
.tier-grp-CADET     { color: var(--cat-cyan);   border-color: rgba(var(--cat-cyan-rgb), 0.35); }
.tier-grp-OPERATIVE { color: var(--cat-green);  border-color: rgba(var(--cat-green-rgb), 0.35); }
.tier-grp-MARSHAL   { color: var(--cat-purple); border-color: rgba(var(--cat-purple-rgb), 0.35); }
.tier-grp-COMMANDER { color: var(--cat-gold);   border-color: rgba(var(--cat-gold-rgb), 0.35); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
#main-content {
  padding: 1.75rem;
  background: var(--bg);
  overflow-y: auto;
}

.board-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.4rem;
  overflow: hidden;
}

.board-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-dim);
}

.board-header-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.16em;
}

.board-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
}

.board-thread-count {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* Thread table */
.thread-table {
  width: 100%;
  border-collapse: collapse;
}

.thread-row {
  border-bottom: 1px solid var(--border-dim);
  cursor: pointer;
  transition: background var(--transition);
}

.thread-row:hover {
  background: rgba(var(--surface-rgb), 0.8);
}

.thread-title-cell {
  padding: 14px 18px;
}

.thread-title-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.thread-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

.thread-confirms {
  color: var(--accent);
}

.thread-badge-cell {
  text-align: right;
  white-space: nowrap;
  padding: 14px 18px;
  vertical-align: middle;
}

.badge {
  font-family: var(--mono);
  font-size: 0.56rem;
  padding: 3px 8px;
  letter-spacing: 1px;
  border: 1px solid;
  border-radius: 4px;
}

.badge-hot {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.badge-new {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.badge-active {
  color: var(--accent-green);
  border-color: rgba(0, 229, 160, 0.4);
  background: rgba(0, 229, 160, 0.06);
}

.badge-op {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

.badge-op {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

/* Pinned threads */
.thread-row.pinned {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--accent);
}

.thread-row.pinned:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pinned-icon {
  color: var(--accent);
  font-size: 0.8rem;
  margin-right: 4px;
  display: inline-block;
  transform: rotate(45deg);
}

/* ── POST CARDS ───────────────────────────────────────────── */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color var(--transition);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(var(--bg-rgb), 0.45);
  border-bottom: 1px solid var(--border-dim);
  flex-wrap: wrap;
}

/* avatar chip in post header */
.post-avatar-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid;
}

.post-callsign {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: color var(--transition);
}

.post-callsign:hover {
  color: var(--text-bright);
}

.post-tier {
  font-family: var(--mono);
  font-size: 0.56rem;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
}

.post-spec {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--text-dim);
}

.post-time {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--text-dim);
  margin-left: auto;
}

.post-body {
  padding: 1.1rem 1.3rem;
  color: #8dafc8;
  font-size: 0.88rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 7px 1.3rem;
  border-top: 1px solid var(--border-dim);
}

.confirm-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 3px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all var(--transition);
  border-radius: 4px;
}

.confirm-btn:hover,
.confirm-btn.confirmed {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.confirm-count {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* Reply inputs */
.reply-box {
  margin-top: 1.3rem;
  border: 1px solid var(--border);
  padding: 1.1rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.reply-textarea {
  width: 100%;
  background: rgba(var(--bg-rgb), 0.6);
  border: 1px solid var(--border-dim);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.8rem;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color var(--transition);
  border-radius: 6px;
}

.reply-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.back-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 5px 14px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all var(--transition);
  border-radius: 4px;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── MODALS ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--surface-2);
  border: 1px solid var(--accent);
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  animation: modalIn 0.22s ease forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.28em;
  margin-bottom: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.modal-close:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.38rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(var(--bg-rgb), 0.75);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.84rem;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color var(--transition);
  border-radius: 6px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.form-select option {
  background: var(--surface);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-error {
  color: var(--danger);
  font-family: var(--mono);
  font-size: 0.68rem;
  margin-bottom: 0.5rem;
  min-height: 1.1em;
}

/* Avatar colour picker in registration */
.avatar-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.avatar-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}

.avatar-swatch:hover {
  transform: scale(1.15);
}

.avatar-swatch.selected {
  border-color: var(--text-bright);
  box-shadow: 0 0 10px currentColor;
  transform: scale(1.1);
}

/* Interests tag input */
.interests-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.interest-chip {
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(var(--inverse-rgb), 0.03);
}

/* ── PROFILE PANEL ────────────────────────────────────────── */
.profile-panel {
  position: fixed;
  top: var(--nav-offset);
  right: 0;
  bottom: 0;
  width: 360px;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  z-index: 300;
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -16px 0 50px rgba(0, 0, 0, 0.7);
}

.profile-panel.open {
  transform: translateX(0);
}

.profile-panel.hidden {
  display: none;
}

.profile-inner {
  padding: 2rem 1.5rem 3rem;
}

.profile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

.profile-close:hover {
  color: var(--danger);
}

/* Profile header strip */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--mono);
  flex-shrink: 0;
  border: 2px solid;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-callsign {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
  word-break: break-all;
}

.profile-tier-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 6px;
}

.profile-spec {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.profile-joined {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Stat grid — 4 cells */
.profile-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.profile-stat {
  background: var(--surface-2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.8rem;
  text-align: center;
}

.profile-stat-n {
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}

.profile-stat-l {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Bio section */
.profile-section-title {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.profile-bio {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.3rem;
  white-space: pre-wrap;
}

/* Interests tags */
.profile-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.profile-interest-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(var(--inverse-rgb), 0.03);
  transition: all var(--transition);
}

.profile-interest-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  background: rgba(var(--inverse-rgb), 0.03);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  transition: all var(--transition);
}

.profile-meta-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-meta-link {
  text-decoration: none;
}

/* Edit section */
.profile-edit-section {
  border-top: 1px solid var(--border-dim);
  padding-top: 1.3rem;
  margin-top: 0.5rem;
}

/* ── CHANNEL HEADER TAGS ──────────────────────────────────── */
.channel-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid;
}

.tag-cyan {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.4);
  background: rgba(var(--cat-cyan-rgb), 0.07);
}

.tag-purple {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.4);
  background: rgba(var(--cat-purple-rgb), 0.07);
}

.tag-green {
  color: var(--cat-green);
  border-color: rgba(var(--cat-green-rgb), 0.4);
  background: rgba(var(--cat-green-rgb), 0.07);
}

.tag-red {
  color: var(--cat-red);
  border-color: rgba(var(--cat-red-rgb), 0.4);
  background: rgba(var(--cat-red-rgb), 0.07);
}

.tag-gold {
  color: var(--cat-gold);
  border-color: rgba(var(--cat-gold-rgb), 0.4);
  background: rgba(var(--cat-gold-rgb), 0.07);
}

.tag-orange {
  color: var(--cat-orange);
  border-color: rgba(var(--cat-orange-rgb), 0.4);
  background: rgba(var(--cat-orange-rgb), 0.07);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.8;
}

/* ── MOBILE CATEGORY TABS ─────────────────────────────────── */
.mobile-cat-tabs {
  display: none;
  /* hidden on desktop */
  position: fixed;
  top: var(--nav-offset);
  left: 0;
  right: 0;
  z-index: 400;
  background: rgba(var(--bg-rgb), 0.97);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-cat-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.mobile-cat-tab .mobile-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-cyan .mobile-cat-dot {
  background: var(--accent);
}

.tab-purple .mobile-cat-dot {
  background: var(--highlight);
}

.tab-green .mobile-cat-dot {
  background: var(--accent-green);
}

.tab-red .mobile-cat-dot {
  background: #ffffff;
}

.tab-gold .mobile-cat-dot {
  background: #ffffff;
}

.tab-orange .mobile-cat-dot {
  background: var(--cat-orange);
}

.mobile-cat-tab.tab-orange.active {
  color: var(--cat-orange);
  border-bottom-color: var(--cat-orange);
  background: rgba(var(--cat-orange-rgb), 0.07);
}


.mobile-cat-tab.tab-cyan.active {
  color: var(--cat-cyan);
  border-bottom-color: var(--cat-cyan);
  background: rgba(255, 255, 255, 0.07);
}

.mobile-cat-tab.tab-purple.active {
  color: var(--highlight);
  border-bottom-color: var(--highlight);
  background: rgba(255, 255, 255, 0.07);
}

.mobile-cat-tab.tab-green.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
  background: rgba(0, 229, 160, 0.07);
}

.mobile-cat-tab.tab-red.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.mobile-cat-tab.tab-gold.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links .nav-link {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Hide nav links but keep theme toggle */
  .mobile-cat-tabs {
    display: flex;
  }

  .board-layout {
    grid-template-columns: 1fr;
    /* nav (62px) + mobile category tabs (~44px) */
    padding-top: calc(var(--nav-offset) + 44px);
    --mobile-tabs-h: 44px;
  }

  .sidebar {
    display: none;
  }

  .cat-grid {
    gap: 1rem;
  }

  .cat-card-left {
    min-width: 80px;
    padding: 1.5rem 1rem;
  }

  .hero-divider-text {
    padding: 0 1rem;
    letter-spacing: 0.15em;
  }

  .profile-panel {
    width: 100%;
    right: -100%;
  }

  .admin-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  #topnav {
    padding: 0 1rem;
    height: var(--nav-h);
    min-height: var(--nav-h);
    align-items: center;
  }

  .nav-brand {
    gap: 2px;
  }

  .brand-glyph {
    font-size: 1.3rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .nav-right>span {
    display: none;
  }

  /* Hide names on strict mobile to save space */
  .nav-right .btn-sm {
    padding: 0.35rem 0.55rem;
    font-size: 0.65rem;
  }

  #theme-toggle {
    margin-left: 4px !important;
  }

  .nav-right {
    width: 100%;
    justify-content: flex-end;
  }

  .hero {
    min-height: 340px;
    height: auto;
    padding: 2.5rem 1rem 2rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .cat-card-inner {
    flex-direction: column;
  }

  .cat-card-left {
    flex-direction: row;
    justify-content: flex-start;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid var(--border-dim);
    padding: 1rem;
  }

  .cat-card-arrow {
    display: none;
  }

  .hft {
    display: none;
  }

  .thread-table tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .thread-title-cell {
    padding: 12px 10px;
    flex: 1;
    min-width: 0;
  }

  .thread-badge-cell {
    padding: 12px 10px 12px 0;
  }

  .post-card {
    padding: 1rem;
  }

  .post-header {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .profile-stat-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .modal {
    width: 95%;
    padding: 1.2rem;
  }
}

/* Utility Classes */
.pd-std {
  padding: 14px 16px;
}

.mt-x {
  margin-top: 8px;
}

.flex-1 {
  flex: 1;
}

.legend-text {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 2.2;
}

.legend-title {
  color: #333;
  margin-bottom: 4px;
}

/* Composer toolbar */
.composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  background: rgba(var(--inverse-rgb), 0.04);
}

.composer-tool-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(var(--surface-rgb), 0.8);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.composer-tool-btn:hover {
  color: var(--text-bright);
  border-color: var(--accent-dim);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.composer-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.composer-emoji-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  background: rgba(var(--surface-rgb), 0.8);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.composer-emoji-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Inbox / private messages */
.message-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  min-height: 68vh;
}

.message-sidebar,
.message-thread-pane,
.message-compose-card {
  border: 1px solid var(--border-dim);
  background: rgba(var(--surface-rgb), 0.78);
  border-radius: var(--radius-lg);
}

.message-sidebar,
.message-thread-pane {
  min-height: 0;
}

.message-sidebar {
  padding: 1rem;
}

.message-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8rem;
}

.message-sidebar-actions {
  margin-bottom: 0.8rem;
}

.message-conversation-list,
.message-thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.message-conversation-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-dim);
  background: rgba(var(--bg-rgb), 0.32);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.message-conversation-card:hover,
.message-conversation-card.active {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}

.message-conversation-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.message-conversation-copy {
  min-width: 0;
}

.message-conversation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.message-conversation-name {
  color: var(--text-bright);
  font-weight: 700;
}

.message-conversation-subject {
  color: var(--accent);
  font-size: 0.78rem;
  margin-bottom: 0.22rem;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

.message-conversation-preview {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.message-conversation-badge {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.message-thread-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 1rem;
}

.message-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-dim);
}

.message-thread-title {
  color: var(--text-bright);
  font-size: 1.1rem;
  font-weight: 700;
}

.message-thread-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.message-bubble-row {
  display: flex;
}

.message-bubble-row.outgoing {
  justify-content: flex-end;
}

.message-bubble {
  width: min(100%, 78%);
  border: 1px solid var(--border-dim);
  background: rgba(var(--bg-rgb), 0.34);
  border-radius: 18px 18px 18px 8px;
  padding: 0.9rem 1rem;
}

.message-bubble.outgoing {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 18px 18px 8px 18px;
}

.message-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.message-bubble-subject {
  color: var(--text-bright);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.message-bubble-body {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
}

.message-compose-card {
  margin-top: 0.9rem;
  padding: 1rem;
}

.message-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.message-item {
  border: 1px solid var(--border-dim);
  background: rgba(var(--bg-rgb), 0.35);
  border-radius: 4px;
  padding: 10px 12px;
}

.message-item.unread {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.message-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.message-from {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-time {
  white-space: nowrap;
}

.message-subject {
  font-size: 0.88rem;
  color: var(--text-bright);
  font-weight: 600;
  margin-bottom: 4px;
}

.message-body-snippet {
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.message-empty {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.8rem 0;
}

.inbox-modal .form-group {
  margin-bottom: 0.9rem;
}

.inbox-modal .form-textarea {
  min-height: 180px;
}

.profile-edit-section .profile-avatar {
  width: 52px;
  height: 52px;
}

@media (max-width: 920px) {
  .message-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .message-thread-pane {
    min-height: 56vh;
  }

  .message-bubble {
    width: min(100%, 88%);
  }
}

.pt-0 {
  padding-top: 0;
}

.text-center {
  text-align: center;
}

.mt-2rem {
  margin-top: 2rem;
}

.back-link {
  color: var(--text-dim);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════
   C.S.F — MILITARY RANK & MEDAL SYSTEM
   ══════════════════════════════════════════════════════════ */

/* ── RANK INSIGNIA (tier badges upgraded) ─────────────────── */
.tier-badge {
  font-family: var(--mono);
  font-size: 0.56rem;
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.06em;
}

.tier-badge::before {
  font-size: 0.65rem;
}

.tier-RECRUIT {
  color: #7a9cc4;
  border-color: #1a3255;
  background: rgba(122, 156, 196, 0.06);
}

.tier-RECRUIT::before {
  content: '○';
}

.tier-OPERATOR {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.tier-OPERATOR::before {
  content: '◈';
}

.tier-SPECIALIST {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.tier-SPECIALIST::before {
  content: '◆';
}

.tier-MASTER {
  color: #ffffff;
  border-color: #7a0022;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.tier-MASTER::before {
  content: '★';
}

/* Keep ADMIN alias working */
.tier-ADMIN {
  color: #ffffff;
  border-color: #7a0022;
  background: rgba(255, 255, 255, 0.08);
}

.tier-ADMIN::before {
  content: '★';
}

/* ── RANK STRIPES (decorative bar above tier badge) ───────── */
.rank-stripes {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
}

.rank-stripe {
  height: 3px;
  border-radius: 2px;
  flex: 1;
}

.stripes-RECRUIT .rank-stripe {
  background: #1a3255;
  max-width: 12px;
}

.stripes-OPERATOR .rank-stripe {
  background: var(--accent-dim);
  max-width: 12px;
}

.stripes-SPECIALIST .rank-stripe {
  background: var(--highlight-dim);
  max-width: 12px;
}

.stripes-MASTER .rank-stripe {
  background: #ffffff;
  max-width: 12px;
  box-shadow: 0 0 4px #ffffff;
}

/* ── MEDAL BADGES ─────────────────────────────────────────── */
.medals-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.2rem;
}

.medal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid;
  transition: all var(--transition);
  cursor: default;
  position: relative;
}

.medal:hover {
  transform: translateY(-2px);
}

.medal-icon {
  font-size: 0.85rem;
}

/* Medal variants */
.medal-first-blood {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.medal-signal-boost {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.medal-operator {
  color: var(--accent-green);
  border-color: rgba(0, 229, 160, 0.4);
  background: rgba(0, 229, 160, 0.08);
}

.medal-ghost {
  color: #8fb2e3;
  border-color: rgba(143, 178, 227, 0.3);
  background: rgba(143, 178, 227, 0.05);
}

.medal-mindcraft {
  color: var(--highlight);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.medal-ironclad {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.medal-centurion {
  color: #ff8a00;
  border-color: rgba(255, 138, 0, 0.5);
  background: rgba(255, 138, 0, 0.1);
  box-shadow: 0 0 12px rgba(255, 138, 0, 0.2);
}

.medal-legend {
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15));
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
  animation: legendPulse 3s ease-in-out infinite;
}

@keyframes legendPulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.2);
  }
}

/* ── REPUTATION SCORE ─────────────────────────────────────── */
.rep-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent);
}

.rep-score-num {
  font-size: 1rem;
  font-weight: 700;
}

.rep-score-label {
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* ── LEADERBOARD PANEL ────────────────────────────────────── */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  transition: background var(--transition);
  cursor: pointer;
}

.leaderboard-row:hover {
  background: rgba(var(--inverse-rgb), 0.05);
}

.lb-rank {
  font-size: 0.6rem;
  color: var(--text-dim);
  min-width: 18px;
  text-align: center;
}

.lb-rank-1 {
  color: #f59e0b;
  font-weight: 700;
}

.lb-rank-2 {
  color: #8fb2e3;
  font-weight: 700;
}

.lb-rank-3 {
  color: #cd7f32;
  font-weight: 700;
}

.lb-name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  color: var(--accent);
  font-size: 0.6rem;
}

/* ── MANIFESTO PAGE ───────────────────────────────────────── */
.manifesto-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.manifesto-eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.manifesto-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.manifesto-title .accent {
  color: var(--accent);
}

.manifesto-title .highlight {
  color: var(--highlight);
}

.manifesto-title .green {
  color: var(--accent-green);
}

.manifesto-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--highlight), var(--accent-green), transparent);
  margin: 2.5rem 0;
  opacity: 0.4;
}

.manifesto-section {
  margin-bottom: 2.5rem;
}

.manifesto-section-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.manifesto-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.manifesto-body {
  font-size: 0.95rem;
  color: var(--steel);
  line-height: 1.9;
}

.manifesto-body strong {
  color: var(--text);
}

.manifesto-quote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.manifesto-sig {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-dim);
  letter-spacing: 0.1em;
}

/* ── TRENDING TOPICS TICKER ───────────────────────────────── */
.intel-ticker {
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
}

.intel-ticker-inner {
  display: inline-block;
  animation: tickerScroll 40s linear infinite;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.intel-ticker-inner:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  padding: 0 2rem;
}

.ticker-item .ticker-tag {
  color: var(--cat-cyan);
  margin-right: 6px;
}

.ticker-item .ticker-tag-purple {
  color: var(--highlight);
}

.ticker-item .ticker-tag-green {
  color: var(--accent-green);
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ── POST CARD RANK DISPLAY ───────────────────────────────── */
.post-rank-insignia {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

.insignia-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

/* ── THREAD ROW ENHANCEMENTS ──────────────────────────────── */
.thread-row.classified {
  border-left: 2px solid var(--highlight);
  background: rgba(255, 255, 255, 0.03);
}

.thread-row.intel {
  border-left: 2px solid var(--accent-green);
  background: rgba(0, 229, 160, 0.02);
}

/* ── UTILITY ──────────────────────────────────────────────── */
.pt-0 {
  padding-top: 0;
}

.text-center {
  text-align: center;
}

.mt-2rem {
  margin-top: 2rem;
}

.back-link {
  color: var(--text-dim);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════
   SESSION 7 — NEW FEATURE STYLES
   ══════════════════════════════════════════════════════════ */

/* ── LOAD MORE PAGINATION ────────────────────────────────── */
.load-more-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  padding: 10px 32px;
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
  animation: loadMoreSweep 2s ease-in-out infinite;
}

@keyframes loadMoreSweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.load-more-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

/* ── BOOKMARK INDICATORS & BUTTON ────────────────────────── */
.bookmark-indicator {
  color: var(--warn);
  font-size: 0.75rem;
  margin-right: 2px;
  animation: bookmarkGlow 2s ease-in-out infinite;
}

@keyframes bookmarkGlow {

  0%,
  100% {
    text-shadow: none;
  }

  50% {
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
  }
}

.bookmark-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
}

.bookmark-btn:hover {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.4);
}

.bookmark-btn.bookmarked {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

/* ── REPLY ACTION BUTTONS ────────────────────────────────── */
.post-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.reply-action-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.6rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 3px;
  opacity: 0.5;
  transition: all var(--transition);
  letter-spacing: 0.05em;
}

.reply-action-btn:hover {
  opacity: 1;
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(255, 255, 255, 0.05);
}

.reply-action-delete:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

/* ── NOTIFICATION BELL ───────────────────────────────────── */
.notif-bell-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.notif-bell-icon {
  font-size: 1.2rem;
  filter: grayscale(0.5);
  transition: filter var(--transition);
}

.notif-bell-btn:hover .notif-bell-icon {
  filter: grayscale(0);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffffff;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
  }

  50% {
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
  }
}

/* ── NOTIFICATION ITEMS ──────────────────────────────────── */
.notif-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dim);
  transition: background var(--transition);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-unread {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.notif-message {
  font-size: 0.8rem;
  color: var(--text);
  margin-bottom: 3px;
}

.notif-time {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-dim);
}

/* ── MARKDOWN RENDERED CONTENT ───────────────────────────── */
.post-body .md-code-block {
  background: rgba(var(--bg-rgb), 0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 0.8rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--steel);
  white-space: pre;
}

.post-body .md-code-block code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.post-body .md-inline-code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--accent);
}

.post-body .md-h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 1rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.post-body .md-h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.8rem 0 0.4rem;
}

.post-body .md-h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.6rem 0 0.3rem;
}

.post-body .md-blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 4px 4px 0;
  color: var(--steel);
  font-style: italic;
}

.post-body .md-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: text-decoration-color var(--transition);
}

.post-body .md-link:hover {
  text-decoration-color: var(--accent);
}

.post-body .md-li,
.post-body .md-oli {
  margin-left: 1.5rem;
  padding: 2px 0;
  color: var(--steel);
}

.post-body .md-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 1rem 0;
}


/* ══════════════════════════════════════════════════════════
   SESSION 8 — NOTIFICATION BELL, INBOX POLISH, PROFILE TAGS
   ══════════════════════════════════════════════════════════ */

/* ── NOTIFICATION BELL BUTTON ────────────────────────────── */
.notif-bell-btn {
  position: relative;
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
  font-size: 1rem;
  line-height: 1;
}

.notif-bell-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.notif-bell-icon {
  font-size: 1rem;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* ── NOTIFICATION ITEMS ──────────────────────────────────── */
.notif-item {
  padding: 10px 12px;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  margin-bottom: 6px;
  background: rgba(var(--bg-rgb), 0.35);
  transition: background var(--transition), border-color var(--transition);
}

.notif-item:hover {
  background: rgba(var(--surface-rgb), 0.8);
  border-color: var(--border);
}

.notif-item.notif-unread {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.notif-message {
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 4px;
}

.notif-time {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-dim);
}

/* ── INBOX TABS ──────────────────────────────────────────── */
.inbox-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 1rem;
}

.inbox-tab {
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.inbox-tab:hover {
  color: var(--text);
}

.inbox-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── REPLY ACTION BUTTON ─────────────────────────────────── */
.reply-action-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.06em;
}

.reply-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reply-action-delete:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ── POST ACTIONS RIGHT ──────────────────────────────────── */
.post-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* ── BOOKMARK BUTTON ─────────────────────────────────────── */
.bookmark-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.bookmark-btn:hover,
.bookmark-btn.bookmarked {
  border-color: var(--warn);
  color: var(--warn);
}


/* ── ATTACHMENT SYSTEM ─────────────────────────────────────── */
.attachment-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(var(--surface-rgb), 0.5);
  border-radius: var(--radius);
  min-height: 0;
}

.attachment-preview-area:empty {
  display: none;
}

.attachment-preview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.attachment-preview-name {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.attachment-remove-btn:hover {
  background: #ffffff;
}

/* Post attachments display */
.post-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dim);
}

.post-attachment-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-attachment-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: contain;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-attachment-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.post-attachment-video {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.post-attachment-audio {
  width: 100%;
  max-width: 400px;
}

.post-attachment-file {
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}

.post-attachment-file:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.post-attachment-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.post-attachment-icon {
  font-size: 2rem;
}

.post-attachment-name {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}

.post-attachment-size {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}


/* ── CODE SYNTAX HIGHLIGHTING (Cyberpunk Theme) ──────────────── */
.md-code-block {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem !important;
  overflow-x: auto;
  max-width: 100%;
  margin: 0.75rem 0;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.md-code-block code {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

/* Highlight.js cyberpunk color overrides */
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: var(--accent) !important;
  font-weight: 600;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
  color: var(--accent-green) !important;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
  color: var(--text-dim) !important;
  font-style: italic;
}

.hljs-number,
.hljs-regexp,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
  color: var(--highlight) !important;
}

.hljs-function,
.hljs-class,
.hljs-title.class_,
.hljs-title.function_ {
  color: #fbbf24 !important;
  font-weight: 600;
}

.hljs-tag,
.hljs-doctag,
.hljs-built_in,
.hljs-params {
  color: var(--steel) !important;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}

/* Light theme adjustments */
:root[data-theme="light"] .md-code-block {
  background: rgba(0, 0, 0, 0.03) !important;
  box-shadow: inset 0 0 20px rgba(0, 125, 232, 0.05);
}

:root[data-theme="light"] .hljs-keyword,
:root[data-theme="light"] .hljs-selector-tag,
:root[data-theme="light"] .hljs-literal {
  color: #0066cc !important;
}

:root[data-theme="light"] .hljs-string,
:root[data-theme="light"] .hljs-title {
  color: #059669 !important;
}

:root[data-theme="light"] .hljs-comment {
  color: #64748b !important;
}


/* ── THREAD TAGS ──────────────────────────────────────────── */
.thread-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}

.thread-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  transition: all var(--transition);
  cursor: pointer;
}

.thread-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

:root[data-theme="light"] .thread-tag {
  color: #007de8;
  background: rgba(0, 125, 232, 0.08);
  border-color: rgba(0, 125, 232, 0.25);
}

:root[data-theme="light"] .thread-tag:hover {
  background: rgba(0, 125, 232, 0.15);
  border-color: rgba(0, 125, 232, 0.4);
}

.tag-filter-breadcrumb {
  padding: 8px 18px;
  background: rgba(var(--accent-rgb), 0.05);
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-tag {
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 10px var(--accent-glow);
}

.clear-tag {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.6rem;
  padding: 2px 8px;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  transition: all var(--transition);
}

.clear-tag:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(255, 255, 255, 0.1);
}


/* ── LOADING STATES & SKELETON LOADERS ────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-thread-row {
  padding: 1rem;
  border-bottom: 1px solid var(--border-dim);
}

.skeleton-title {
  height: 18px;
  width: 70%;
  margin-bottom: 0.5rem;
}

.skeleton-meta {
  height: 12px;
  width: 40%;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinner-rotate 0.6s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner-rotate 0.6s linear infinite;
}


/* ── MOBILE UX IMPROVEMENTS ───────────────────────────────── */
@media (max-width: 960px) {

  /* Larger touch targets for mobile */
  .btn {
    min-height: 44px;
    padding: 0.8rem 1.8rem;
  }

  .btn-sm {
    min-height: 38px;
    padding: 0.6rem 1.2rem;
  }

  .nav-link {
    min-height: 44px;
    padding: 0.6rem 1.2rem;
  }

  .channel-item {
    min-height: 44px;
    padding: 12px 16px 12px 28px;
  }

  .thread-row {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  }

  .thread-row:active {
    background: rgba(255, 255, 255, 0.05);
  }

  /* Improve form inputs on mobile */
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px;
    /* Prevents zoom on iOS */
    min-height: 44px;
  }

  .form-textarea {
    min-height: 120px;
  }

  /* Better modal sizing on mobile */
  .modal {
    max-width: 95vw !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Improve thread view on mobile */
  .post-item {
    padding: 1rem;
  }

  .post-body {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  /* Better spacing for mobile */
  #main-content {
    padding: 1rem;
  }

  .board-header {
    margin-bottom: 1rem;
  }

  /* Optimize attachment display on mobile */
  .post-attachment-image,
  .post-attachment-video {
    max-width: 100%;
    height: auto;
  }

  /* Improve composer toolbar on mobile */
  .composer-tools {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .composer-tool-btn {
    min-width: 36px;
    min-height: 36px;
  }
}

/* Swipe gesture indicator (visual feedback) */
.swipe-indicator {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 1000;
}

.swipe-indicator.left {
  left: 20px;
}

.swipe-indicator.right {
  right: 20px;
}

.swipe-indicator.active {
  opacity: 0.6;
}


/* ══════════════════════════════════════════════════════════════
   PHASE 1 REDESIGN — Multi-Page Forum Structure
   ══════════════════════════════════════════════════════════════ */

/* ── BREADCRUMB NAVIGATION ──────────────────────────────────── */
.breadcrumb-container {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  margin-top: var(--nav-offset);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breadcrumb-item {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-item:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-dim);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ── CATEGORY VIEW ──────────────────────────────────────────── */
.category-view-container {
  min-height: calc(100vh - var(--nav-offset) - 60px);
  padding: 2rem 0;
  background: var(--bg);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.category-icon-large {
  font-size: 4rem;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px var(--accent-glow-s);
}

.category-header-content {
  flex: 1;
}

.category-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.category-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.category-stats {
  display: flex;
  gap: 2rem;
}

.category-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-stat .stat-number {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.category-stat .stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.channel-list-container {
  margin-bottom: 2rem;
}

.channel-list-container .section-label {
  margin-bottom: 1rem;
}

.channel-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.channel-row:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateX(4px);
}

.channel-row-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-icon {
  font-size: 2rem;
  color: var(--accent);
  font-family: var(--mono);
}

.channel-row-content {
  flex: 1;
}

.channel-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  font-family: var(--mono);
}

.channel-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.channel-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.channel-thread-count {
  color: var(--accent);
}

.channel-separator {
  color: var(--text-dim);
}

.channel-last-post {
  color: var(--text-muted);
}

.channel-row-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  transition: transform var(--transition), color var(--transition);
}

.channel-row:hover .channel-row-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.channel-row.ch-cyan:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.channel-row.ch-purple:hover {
  border-color: var(--cat-purple);
  box-shadow: 0 0 20px rgba(var(--cat-purple-rgb), 0.2);
}

.channel-row.ch-green:hover {
  border-color: var(--cat-green);
  box-shadow: 0 0 20px rgba(var(--cat-green-rgb), 0.2);
}

.channel-row.ch-red:hover {
  border-color: var(--cat-red);
  box-shadow: 0 0 20px rgba(var(--cat-red-rgb), 0.2);
}

.channel-row.ch-gold:hover {
  border-color: var(--cat-gold);
  box-shadow: 0 0 20px rgba(var(--cat-gold-rgb), 0.2);
}

.channel-row.ch-orange:hover {
  border-color: var(--cat-orange);
  box-shadow: 0 0 20px rgba(var(--cat-orange-rgb), 0.2);
}

.category-sidebar {
  margin-top: 2rem;
}

.sidebar-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.sidebar-panel .panel-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.activity-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-dim);
  cursor: pointer;
  transition: background var(--transition);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--surface-2);
}

.activity-item .activity-title {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.activity-item .activity-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ── CHANNEL VIEW ───────────────────────────────────────────── */
.channel-view-container {
  min-height: calc(100vh - var(--nav-offset) - 60px);
  padding: 2rem 0;
  background: var(--bg);
}

.channel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.channel-header-left {
  flex: 1;
}

.channel-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  font-family: var(--mono);
}

.channel-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.channel-header-actions {
  display: flex;
  gap: 0.75rem;
}

.thread-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.thread-sort,
.thread-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thread-sort label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.thread-sort select {
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  cursor: pointer;
}

.thread-filter input {
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  width: 300px;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thread-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.thread-row:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.thread-row.thread-pinned {
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.thread-row-left {
  display: flex;
  gap: 0.5rem;
}

.thread-pin-icon,
.thread-hot-icon {
  font-size: 1.25rem;
}

.thread-row-content {
  flex: 1;
  min-width: 0;
}

.thread-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.thread-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.thread-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--accent);
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.thread-author {
  color: var(--accent);
}

.thread-separator {
  color: var(--text-dim);
}

.thread-row-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.thread-stat .stat-number {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.thread-stat .stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* ── THREAD VIEW ────────────────────────────────────────────── */
.thread-view-container {
  min-height: calc(100vh - var(--nav-offset) - 60px);
  padding: 2rem 0;
  background: var(--bg);
}

.featured-dossier {
  margin: 2.5rem 0 0;
}

.featured-dossier-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 0.9fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--highlight-rgb), 0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(var(--highlight-rgb), 0.16), transparent 36%),
    linear-gradient(180deg, rgba(14, 16, 24, 0.96), rgba(7, 9, 14, 0.98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.featured-dossier-media {
  position: relative;
  min-height: 320px;
  background: linear-gradient(135deg, rgba(var(--highlight-rgb), 0.22), rgba(var(--accent-rgb), 0.12));
}

.featured-dossier-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.featured-dossier-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 5, 10, 0.04), rgba(4, 5, 10, 0.52));
}

.featured-dossier-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 2.2rem;
}

.featured-dossier-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--highlight);
}

.featured-dossier-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
  color: var(--text-bright);
}

.featured-dossier-copy {
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 1rem;
}

.featured-dossier-points {
  display: grid;
  gap: 0.65rem;
  margin: 0.35rem 0 0.6rem;
}

.featured-dossier-point {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.92rem;
}

.featured-dossier-point::before {
  content: '•';
  color: var(--highlight);
  font-size: 1rem;
  line-height: 1;
}

.featured-dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.thread-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.thread-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-dim);
}

.thread-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.thread-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.thread-badge-pinned {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.thread-badge-hot {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.thread-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thread-author {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.thread-spec {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.thread-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

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

.thread-card-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.thread-card-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.thread-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dim);
}

.thread-confirms {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.replies-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.reply-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.reply-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-dim);
}

.reply-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reply-author {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.reply-spec {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.reply-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.reply-card-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.reply-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-dim);
}

.reply-confirms {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.reply-actions {
  display: flex;
  gap: 0.5rem;
}

.quick-reply-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.quick-reply-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
}

.reply-input {
  width: 100%;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.quick-reply-actions {
  display: flex;
  justify-content: flex-end;
}

/* ── MOBILE RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .breadcrumb {
    font-size: 0.7rem;
  }

  .breadcrumb-item:not(:last-of-type):not(:nth-last-of-type(2)) {
    display: none;
  }

  .category-header {
    flex-direction: column;
    text-align: center;
  }

  .category-icon-large {
    width: 80px;
    height: 80px;
    font-size: 3rem;
  }

  .category-title {
    font-size: 2rem;
  }

  .channel-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .thread-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .thread-filter input {
    width: 100%;
  }

  .thread-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .thread-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .thread-card-title {
    font-size: 1.5rem;
  }

  .category-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .channel-meta,
  .thread-meta {
    flex-wrap: wrap;
  }

  .thread-row-stats {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
  }

  .thread-card,
  .reply-card,
  .quick-reply-container,
  .channel-header,
  .thread-controls,
  .category-header,
  .sidebar-panel {
    padding: 1.1rem;
  }

  .featured-dossier-card {
    grid-template-columns: 1fr;
  }

  .featured-dossier-media {
    min-height: 240px;
  }

  .featured-dossier-content {
    padding: 1.35rem;
  }

  .featured-dossier-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {

  .category-view-container,
  .channel-view-container,
  .thread-view-container {
    padding: 1rem 0 1.5rem;
  }

  .breadcrumb-container {
    padding: 0.55rem 0;
  }

  .channel-row,
  .thread-row {
    padding: 1rem;
  }

  .channel-title,
  .category-title {
    font-size: 1.55rem;
  }

  .thread-card-title {
    font-size: 1.3rem;
  }

  .quick-reply-actions {
    justify-content: stretch;
  }

  .quick-reply-actions .btn {
    width: 100%;
  }
}

/* ── LOADING & EMPTY STATES ─────────────────────────────────── */
.loading-message,
.empty-message,
.error-message {
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.error-message {
  color: var(--danger);
}

/* Theme remap overrides */
.cat-icon-wrap-cyan {
  background: rgba(var(--cat-cyan-rgb), 0.1);
  border-color: rgba(var(--cat-cyan-rgb), 0.25);
  color: var(--cat-cyan);
}

.feature-list-icon:first-child {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
}

.cat-icon-wrap-purple {
  background: rgba(var(--cat-purple-rgb), 0.1);
  border-color: rgba(var(--cat-purple-rgb), 0.25);
  color: var(--cat-purple);
}

.cat-icon-wrap-green {
  background: rgba(var(--cat-green-rgb), 0.1);
  border-color: rgba(var(--cat-green-rgb), 0.25);
  color: var(--cat-green);
}

.cat-tag-cyan,
.badge-new,
.tag-cyan,
.tier-OPERATOR {
  color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.32);
  background: rgba(var(--cat-cyan-rgb), 0.08);
}

.cat-tag-purple,
.tag-purple,
.tier-SPECIALIST {
  color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.32);
  background: rgba(var(--cat-purple-rgb), 0.08);
}

.cat-tag-green,
.badge-active,
.tag-green {
  color: var(--cat-green);
  border-color: rgba(var(--cat-green-rgb), 0.32);
  background: rgba(var(--cat-green-rgb), 0.08);
}

.cat-cyan .cat-glow {
  background: var(--cat-cyan);
  box-shadow: 2px 0 16px rgba(var(--cat-cyan-rgb), 0.4);
}

.cat-purple .cat-glow {
  background: var(--cat-purple);
  box-shadow: 2px 0 16px rgba(var(--cat-purple-rgb), 0.4);
}

.cat-green .cat-glow {
  background: var(--cat-green);
  box-shadow: 2px 0 16px rgba(var(--cat-green-rgb), 0.4);
}

.cat-cyan {
  border-color: rgba(var(--cat-cyan-rgb), 0.16);
}

.cat-purple {
  border-color: rgba(var(--cat-purple-rgb), 0.16);
}

.cat-green {
  border-color: rgba(var(--cat-green-rgb), 0.16);
}

.cat-cyan:hover {
  border-color: rgba(var(--cat-cyan-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28), 0 0 25px rgba(var(--cat-cyan-rgb), 0.15);
}

.cat-purple:hover {
  border-color: rgba(var(--cat-purple-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28), 0 0 25px rgba(var(--cat-purple-rgb), 0.15);
}

.cat-green:hover {
  border-color: rgba(var(--cat-green-rgb), 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28), 0 0 25px rgba(var(--cat-green-rgb), 0.15);
}

.channel-item.ch-cyan.active,
.cat-nav-item.cat-nav-cyan.active,
.channel-cat-pill-cyan {
  color: var(--cat-cyan);
  border-left-color: var(--cat-cyan);
  border-color: rgba(var(--cat-cyan-rgb), 0.26);
  background: rgba(var(--cat-cyan-rgb), 0.08);
}

.channel-item.ch-purple.active,
.cat-nav-item.cat-nav-purple.active,
.channel-cat-pill-purple {
  color: var(--cat-purple);
  border-left-color: var(--cat-purple);
  border-color: rgba(var(--cat-purple-rgb), 0.26);
  background: rgba(var(--cat-purple-rgb), 0.08);
}

.channel-item.ch-green.active,
.cat-nav-item.cat-nav-green.active,
.channel-cat-pill-green {
  color: var(--cat-green);
  border-left-color: var(--cat-green);
  border-color: rgba(var(--cat-green-rgb), 0.26);
  background: rgba(var(--cat-green-rgb), 0.08);
}

.channel-item.ch-red.active,
.cat-nav-item.cat-nav-red.active,
.channel-cat-pill-red {
  color: var(--cat-red);
  border-left-color: var(--cat-red);
  border-color: rgba(var(--cat-red-rgb), 0.26);
  background: rgba(var(--cat-red-rgb), 0.08);
}

.channel-item.ch-gold.active,
.cat-nav-item.cat-nav-gold.active,
.channel-cat-pill-gold {
  color: var(--cat-gold);
  border-left-color: var(--cat-gold);
  border-color: rgba(var(--cat-gold-rgb), 0.26);
  background: rgba(var(--cat-gold-rgb), 0.08);
}

/* ── PROFILE TABS ── */
.profile-tabs {
  margin-top: 1rem;
}
.profile-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
}
.profile-tab:hover {
  color: var(--accent);
}
.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ── SIDEBAR SECTIONS ── */
.sidebar-user-header {
  padding: 12px 16px 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  opacity: 0.7;
  text-transform: uppercase;
  border-top: 1px solid var(--border-dim);
  margin-top: 8px;
}

.glowing-channel {
  position: relative;
}
.glowing-channel::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  opacity: 0.4;
}

.channel-item.sub-channel {
  padding-left: 24px;
}

.sidebar-user-header + .channel-item {
  border-top: none;
}

/* â”€â”€ Post-rebrand overrides â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-brand { flex-shrink: 0; white-space: nowrap; }
.brand-name { white-space: nowrap; }
.featured-dossier-card { display: block; max-width: 760px; margin: 0 auto; }
.featured-dossier-media { display: none; }

/* ── NEWS PAGE ──────────────────────────────────────────── */
.news-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.news-head {
  text-align: center;
  margin-bottom: 3rem;
}

.news-eyebrow {
  font-family: var(--mono);
  letter-spacing: 0.3em;
  color: var(--accent);
  font-size: 0.7rem;
  margin-bottom: 0.75rem;
}

.news-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  text-transform: uppercase;
  line-height: 1;
}

.news-title .accent {
  color: var(--hero-accent);
  text-shadow: 0 0 24px rgba(var(--hero-accent-rgb), 0.3);
}

.news-sub {
  color: var(--text-muted);
  max-width: 620px;
  margin: 1rem auto 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

.news-section {
  margin-bottom: 3rem;
}

.news-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.news-section-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.news-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-dim);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.news-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.news-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  flex: 1;
}

.news-card-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.news-card-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
}

.news-card-links a:hover {
  text-decoration: underline;
}

.news-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 2rem;
}

.news-foot code {
  font-family: var(--mono);
  color: var(--text-muted);
}

.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.news-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.news-tab:hover {
  color: var(--text-bright);
  border-color: var(--border-dim);
}

.news-tab.is-active {
  color: var(--text-bright);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.news-view {
  min-height: 200px;
}

.news-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}
