/* ================================================================
   Community Feed — Soft Dark Social App Design System
   ================================================================ */

:root {
  color-scheme: dark;

  --bg-0: #0f0f12;
  --bg-1: #16161a;
  --bg-2: #1e1e24;
  --bg-3: #26262e;
  --bg: var(--bg-0);
  --panel: var(--bg-1);
  --panel-hover: var(--bg-2);

  --ink-0: #e8e8ed;
  --ink-1: #c8c8d0;
  --ink-2: #9898a6;
  --ink-3: #6b6b78;
  --text: var(--ink-0);
  --muted: var(--ink-2);

  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, 0.15);
  --accent-border: rgba(88, 101, 242, 0.35);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-left: 240px;
  --sidebar-right: 300px;
  --app-max: 1280px;
  --mobile-nav-h: 64px;

  font-family: var(--font-sans);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-1);
  background: var(--bg-0);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: #7280ff; }

img { max-width: 100%; height: auto; }

.muted { color: var(--muted); }

/* --- App Layout --- */

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-left) minmax(0, 1fr) var(--sidebar-right);
  gap: 24px;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 20px 20px 0;
  min-height: 100vh;
  align-items: start;
}

.app-main {
  min-width: 0;
  padding-bottom: 32px;
}

.app-sidebar-left,
.app-sidebar-right {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}

/* --- Left Sidebar --- */

.sidebar-brand {
  padding: 4px 12px 20px;
}

.sidebar-brand-link {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-brand-link:hover { color: var(--text); }

.sidebar-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--ink-1);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-item:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.sidebar-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-section {
  margin-top: 24px;
  padding: 0 8px;
}

.sidebar-section-title {
  margin: 0 0 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.category-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-chip {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-1);
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-chip:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.category-chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.sidebar-promo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- Right Sidebar Widgets --- */

.widget-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}

.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.widget-list-item a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.35;
  transition: background 0.15s ease;
}

.widget-list-item a:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.widget-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.widget-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-1);
  transition: background 0.15s ease;
}

.widget-author:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.widget-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-3);
}

.widget-author-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.widget-author-info {
  min-width: 0;
}

.widget-author-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}

.widget-author-stats {
  font-size: 12px;
  color: var(--muted);
}

.ad-block {
  margin-bottom: 16px;
}

/* --- Mobile Bottom Nav --- */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-h);
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  padding: 8px 4px;
  min-width: 0;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-icon {
  width: 22px;
  height: 22px;
}

/* --- Footer --- */

.site-footer {
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-link {
  font-size: 13px;
  color: var(--muted);
}

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

/* --- Breadcrumbs --- */

.breadcrumbs {
  margin-bottom: 16px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb-link {
  color: var(--muted);
}

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

.breadcrumb-separator {
  color: var(--ink-3);
  margin: 0 2px;
}

.breadcrumb-current {
  color: var(--ink-1);
}

/* --- Feed Toolbar --- */

.feed-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 15, 18, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.feed-toolbar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 120px;
}

.search-form-filter {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-input-filter {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.search-input-filter::placeholder { color: var(--ink-3); }

.search-button-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.search-button-filter:hover { color: var(--accent); }

.filters-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.filter-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.filter-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.filter-select:focus {
  border-color: var(--accent-border);
}

.featured-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* --- Post List / Feed --- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Feed Card */

.feed-card,
.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feed-card:hover,
.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}

.feed-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-3);
}

.feed-avatar-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}

.feed-author-info {
  flex: 1;
  min-width: 0;
}

.feed-author-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.feed-author-name:hover { color: var(--accent); }

.feed-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.feed-meta-dot::before {
  content: '·';
  margin-right: 6px;
}

.feed-card-body {
  padding: 12px 16px 0;
}

.feed-card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.feed-card-body h2 a {
  color: var(--text);
}

.feed-card-body h2 a:hover { color: var(--accent); }

.excerpt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.feed-card-image-link {
  display: block;
  margin-top: 12px;
}

.feed-card-image,
.post-card-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.post-card-image-link {
  display: block;
  margin: 12px 16px 0;
}

/* Engagement Bar */

.engagement-bar,
.post-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.engagement-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  min-height: 44px;
}

.engagement-btn:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.engagement-btn.liked {
  color: #f04747;
}

.read-more {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
  margin-right: auto;
}

.read-more:hover {
  background: rgba(88, 101, 242, 0.25);
  color: var(--accent);
}

.btn-icon,
.like-btn-card,
.comment-btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.btn-icon:hover,
.like-btn-card:hover,
.comment-btn-card:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.like-btn-card.liked { color: #f04747; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12px;
  color: var(--muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.author-link {
  color: var(--accent);
  font-weight: 500;
}

/* --- Buttons --- */

.btn,
.btn-header,
.btn-hero,
.btn-article {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff !important;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
  background: var(--accent);
}

.btn:hover,
.btn-header:hover,
.btn-hero:hover,
.btn-article:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #fff !important;
}

.button-icon,
.button-icon-image {
  display: inline-block;
  vertical-align: middle;
}

.button-icon-image {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.button-text { display: inline-block; }

.copyable-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.copyable-block:hover { filter: brightness(1.1); }

.copy-icon { font-size: 16px; }

/* --- Article Page --- */

.post-page-wrapper {
  display: block;
}

.post-article-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.post-author-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 0;
}

.post-author-header .feed-avatar,
.post-author-header .feed-avatar-initials {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.post-title {
  margin: 16px 20px 0;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.post-meta {
  padding: 0 20px;
  margin-top: 10px;
}

.article-engagement-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 16px;
}

.article-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 16px 20px;
}

.article-buttons-top { padding-top: 8px; }

.article-buttons-bottom {
  border-top: 1px solid var(--border);
}

.post-body {
  padding: 20px;
  line-height: 1.75;
  color: var(--ink-1);
  font-size: 16px;
}

.post-body p { margin: 0 0 16px; }

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5, .post-body h6 {
  color: var(--text);
  margin: 24px 0 12px;
  font-weight: 600;
  line-height: 1.3;
}

.post-body h2 { font-size: 1.4em; }
.post-body h3 { font-size: 1.2em; }

.post-body ul, .post-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.post-body img {
  border-radius: var(--radius);
  margin: 12px 0;
}

.post-body a { color: var(--accent); }

.post-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
}

.post-footer-html {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}

.similar-posts-sidebar { display: none; }

.similar-post-sidebar-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.similar-post-sidebar-card:last-child { border-bottom: none; }

.similar-post-sidebar-content h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.similar-post-sidebar-content h3 a {
  color: var(--ink-1);
}

.similar-post-sidebar-content h3 a:hover { color: var(--accent); }

.similar-post-sidebar-excerpt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.similar-post-sidebar-meta {
  display: flex;
  gap: 6px;
}

/* --- Comments --- */

.comments {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.comments h2 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.comment-bubble {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-bubble-content {
  flex: 1;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-top-left-radius: 4px;
  padding: 12px 14px;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-header strong {
  font-size: 14px;
  color: var(--text);
}

.comment-header .muted {
  font-size: 12px;
}

.comment-bubble-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-1);
}

.comment-form h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="number"],
.form-grid textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-grid input:focus,
.form-grid textarea:focus {
  border-color: var(--accent-border);
}

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

.form-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-1);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.like-btn.liked { color: #f04747; }

/* --- Profile / Team --- */

.profile-header {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.profile-cover {
  height: 120px;
  background: linear-gradient(135deg, var(--accent) 0%, #7280ff 50%, #9b59f5 100%);
}

.profile-header-body {
  padding: 0 20px 20px;
  margin-top: -40px;
  position: relative;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--panel);
  object-fit: cover;
  background: var(--bg-3);
}

.profile-avatar-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--panel);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.profile-name {
  margin: 12px 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.profile-bio {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.author-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.author-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.author-card-cover {
  height: 72px;
  background: linear-gradient(135deg, var(--accent) 0%, #7280ff 100%);
}

.author-card-body {
  padding: 0 16px 16px;
  margin-top: -28px;
  text-align: center;
}

.author-avatar {
  display: inline-block;
  margin-bottom: 8px;
}

.author-avatar .avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--panel);
  object-fit: cover;
  background: var(--bg-3);
}

.author-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.author-card h2 a {
  color: var(--text);
}

.author-card h2 a:hover { color: var(--accent); }

.author-email {
  margin: 0 0 8px;
  font-size: 13px;
}

.author-email a { color: var(--muted); }

.author-stats { margin: 0 0 12px; }

.author-actions {
  padding-top: 4px;
}

.team-page-header {
  margin-bottom: 20px;
}

.team-page-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.team-page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* --- Prose / Legal --- */

.prose-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.prose-card h1 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.prose-card .post-body {
  padding: 0;
}

/* --- Pagination --- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}

.pagination-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pagination-link:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.pagination-link-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px;
}

/* --- 404 --- */

.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.page-404-inner {
  text-align: center;
  max-width: 420px;
  padding: 40px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.page-404-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-404-title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.page-404-text {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.page-404-actions { display: flex; justify-content: center; }

/* --- Lazy Loading --- */

.lazy-loading-indicator {
  text-align: center;
  padding: 24px;
}

.lazy-loading-indicator p {
  margin: 0;
  font-size: 14px;
}

/* --- Share Toast --- */

.share-toast {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Search Results --- */

.search-results-header {
  margin-bottom: 16px;
}

.search-results-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.search-query {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.search-query strong { color: var(--text); }

/* --- Responsive --- */

@media (max-width: 1023px) {
  .app-layout {
    grid-template-columns: var(--sidebar-left) minmax(0, 1fr);
  }

  .app-sidebar-right {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding: 12px 12px 0;
    padding-bottom: var(--mobile-nav-h);
  }

  .app-sidebar-left {
    display: none;
  }

  .mobile-bottom-nav {
    display: block;
  }

  .feed-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form-filter {
    max-width: none;
  }

  .filters-divider { display: none; }

  .authors-grid {
    grid-template-columns: 1fr;
  }

  .share-toast {
    bottom: calc(var(--mobile-nav-h) + 12px);
  }
}

/* --- Network Tools --- */

.network-tools-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.network-tools-header h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.network-tools-header p {
  margin: 0;
}

.network-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.network-tool-card-wide {
  grid-column: 1 / -1;
}

.network-tool-own-ip {
  margin: 0;
  font-size: 14px;
  color: var(--ink-1);
}

.network-tool-own-ip code {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.network-tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}

.network-tool-card-head h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.network-tool-card-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.network-tool-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.network-tool-form-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.network-tool-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.network-tool-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.network-tool-input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.network-tool-input-sm {
  max-width: 120px;
}

.network-tool-actions {
  margin-top: auto;
}

.network-tool-result {
  font-size: 13px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  min-height: 24px;
}

.network-tool-result.is-success {
  border-top-color: rgba(76, 175, 80, 0.35);
}

.network-tool-result.is-warning {
  border-top-color: rgba(255, 193, 7, 0.35);
}

.network-tool-result.is-error {
  border-top-color: rgba(244, 67, 54, 0.35);
  color: #ff8a80;
}

.network-tool-loading {
  margin: 0;
  color: var(--muted);
}

.network-kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 4px 0;
  align-items: start;
}

.network-kv span {
  color: var(--muted);
  font-size: 12px;
}

.network-kv strong {
  color: var(--ink-0);
  font-weight: 500;
  word-break: break-word;
}

.network-tool-progress {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}

.network-tool-progress-bar,
.network-tool-progress-bar span {
  display: block;
  height: 100%;
}

.network-tool-progress-bar span {
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7280ff);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.network-scan-summary {
  margin: 12px 0 8px;
  font-weight: 600;
  color: var(--text);
}

.network-scan-safe {
  margin: 0;
  color: #81c784;
}

.risk-port-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.risk-port-item {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left-width: 4px;
}

.risk-port-item.risk-severity-critical { border-left-color: #f44336; }
.risk-port-item.risk-severity-high { border-left-color: #ff9800; }
.risk-port-item.risk-severity-medium { border-left-color: #ffc107; }
.risk-port-item.risk-severity-low { border-left-color: #8bc34a; }

.risk-port-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.risk-port-title {
  color: var(--text);
  font-size: 14px;
}

.risk-severity-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.risk-severity-critical .risk-severity-badge {
  background: rgba(244, 67, 54, 0.18);
  color: #ff8a80;
}

.risk-severity-high .risk-severity-badge {
  background: rgba(255, 152, 0, 0.18);
  color: #ffcc80;
}

.risk-severity-medium .risk-severity-badge {
  background: rgba(255, 193, 7, 0.18);
  color: #ffe082;
}

.risk-severity-low .risk-severity-badge {
  background: rgba(139, 195, 74, 0.18);
  color: #c5e1a5;
}

.risk-port-meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.risk-port-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.risk-port-text {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-1);
}

.risk-port-text:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .network-tools-grid {
    grid-template-columns: 1fr;
  }

  .network-tool-form-row {
    grid-template-columns: 1fr;
  }

  .network-tool-input-sm {
    max-width: none;
  }

  .network-kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}
