:root {
  --bg-main: #02030a;
  --bg-elevated: rgba(8, 10, 18, 0.85);
  --bg-elevated-strong: rgba(12, 14, 24, 0.96);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-strong: rgba(255, 255, 255, 0.16);
  --accent-red: #ff3859;
  --accent-red-soft: rgba(255, 56, 89, 0.6);
  --accent-neon: #ff296d;
  --accent-blue: #3a8dff;
  --text-main: #f5f6ff;
  --text-muted: #a2a7c3;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --shadow-soft: 0 26px 80px rgba(0, 0, 0, 0.75);
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset & base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at 0 0, #110016 0, #02030a 40%, #010104 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Neon background */

.neon-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 41, 109, 0.24) 0, transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(58, 141, 255, 0.24) 0, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0, transparent 65%);
  opacity: 0.9;
  mix-blend-mode: screen;
  z-index: -2;
}

/* Glass helper */

.glass {
  background: linear-gradient(135deg, rgba(9, 11, 22, 0.92), rgba(7, 5, 15, 0.88));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(26px);
  background: linear-gradient(to bottom, rgba(2, 3, 10, 0.96), rgba(2, 3, 10, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-orb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-red) 0, #ff9f43 40%, transparent 70%);
  box-shadow: 0 0 22px var(--accent-red-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Top nav */

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top-link {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.top-link:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.top-link-active {
  color: var(--accent-red);
  border-color: rgba(255, 56, 89, 0.55);
  background: radial-gradient(circle at 0 0, rgba(255, 41, 109, 0.22), transparent 65%);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-glass.primary {
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-neon) 40%, var(--accent-blue) 100%);
  border-color: transparent;
  box-shadow: 0 0 24px rgba(255, 41, 109, 0.75);
}

.btn-glass.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(255, 41, 109, 0.85);
}

.btn-glass.subtle {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(10, 8, 18, 0.85);
  color: var(--text-muted);
}

.btn-glass.subtle:hover {
  color: var(--text-main);
  border-color: var(--accent-blue);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 7, 14, 0.95);
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Layout */

.layout {
  max-width: 1200px;
  margin: 1.8rem auto 2.4rem;
  padding: 0 1.75rem;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1.75rem;
}

/* Sidebar */

.sidebar {
  padding: 1.35rem 1.3rem;
}

.sidebar-section {
  margin-bottom: 1.6rem;
}

.sidebar-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 0.8rem;
}

.stat-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 16, 0.9);
}

.stat-pill-online {
  border-color: rgba(0, 230, 118, 0.7);
  color: #8df5c5;
  background: rgba(0, 230, 118, 0.08);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #00e676;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.9);
  display: inline-block;
  margin-right: 0.25rem;
}

.sidebar-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.sidebar-group-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  transition: all 0.18s ease;
}

.sidebar-link i {
  font-size: 0.85rem;
  width: 18px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.sidebar-link.active {
  background: radial-gradient(circle at 0 0, rgba(255, 41, 109, 0.28), transparent 60%);
  color: var(--accent-red);
  border: 1px solid rgba(255, 56, 89, 0.6);
}

.sidebar-link-legal {
  font-size: 0.8rem;
}

.sidebar-divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 0.7rem 0 0.7rem;
}

/* Main */

.main {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Hero */

.hero {
  padding: 1.6rem 1.6rem 1.4rem;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 1.3rem;
  align-items: flex-start;
}

.hero h1 {
  font-size: 1.5rem;
  margin: 0 0 0.55rem;
}

.hero-lead {
  margin: 0 0 1rem;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hero-stat-card {
  background: radial-gradient(circle at 0 0, rgba(255, 41, 109, 0.18), rgba(7, 7, 16, 0.92));
  border-radius: 18px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.hero-stat-value {
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.hero-stat-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-footer {
  margin-top: 1rem;
}

.pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 5, 14, 0.92);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pill-danger {
  border-color: rgba(255, 56, 89, 0.7);
  color: #ffb3c4;
  background: rgba(120, 10, 40, 0.8);
}

/* Cards & grids */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.grid-secondary {
  margin-top: 0.25rem;
}

.card {
  padding: 1.3rem 1.35rem 1.2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.card-header h2 {
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-header i {
  color: var(--accent-red);
}

.card p {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  margin-top: 0.3rem;
  color: var(--accent-blue);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.card-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
}

.badge-red {
  border-color: rgba(255, 56, 89, 0.8);
  color: var(--accent-red);
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.35rem;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  color: var(--text-muted);
}

.mini-answer {
  color: var(--accent-red);
}

/* Footer */

.footer {
  max-width: 1200px;
  margin: 0 auto 1.8rem;
  padding: 1.2rem 1.75rem 1.1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  margin-bottom: 0.8rem;
}

.footer h3 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}

.footer h4 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
}

.footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer a {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.2rem;
  transition: color 0.16s ease, transform 0.16s ease;
}

.footer a:hover {
  color: var(--accent-red);
  transform: translateX(1px);
}

.footer-bottom {
  font-size: 0.75rem;
  color: #6a708d;
}

/* Mobile drawer */

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(1, 1, 5, 0.85);
  backdrop-filter: blur(28px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-inner {
  max-width: 320px;
  width: 100%;
  height: 100%;
  padding: 1.2rem 1.3rem;
  border-radius: 0;
  border-left: 1px solid var(--glass-border-strong);
  margin-left: auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.mobile-drawer-header button {
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.2rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mobile-nav-item i {
  width: 18px;
}

.mobile-nav-item.active {
  color: var(--accent-red);
}

.mobile-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0.6rem 0;
}

/* Responsive */

.desktop-only { display: flex; }
.mobile-only { display: none; }

@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    order: 2;
  }
  .hero-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }
  .header-inner {
    padding-inline: 1.2rem;
  }
  .layout {
    padding-inline: 1.2rem;
  }
  .footer {
    padding-inline: 1.2rem;
  }
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-inline: 1.2rem;
  }
}
/* Better wrapping for long .onion hostnames */
.onion-input code {
  display: block;
  max-width: 100%;
  white-space: normal;          /* разрешаем перенос */
  word-break: break-all;        /* ломаем строку при необходимости */
  line-height: 1.3;
}

.onion-input {
  align-items: flex-start;      /* кнопка копирования выравнивается по верхней строке */
}

/* Чуть уменьшить шрифт внутри карточек-онион, чтобы не рвалось версткой */
.card-onion code {
  font-size: 0.8rem;
}
/* Security/PGP page additions */
.step-chip {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--accent-red);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.step-card {
  position: relative;
  padding-top: 2rem;
}

.warning-card, .danger-list {
  border-left: 4px solid var(--accent-red-soft);
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
}

.feature-list li {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  position: relative;
}

.feature-list li::before {
  content: "→";
  position: absolute;
  left: -1.2rem;
  color: var(--accent-blue);
}

.compact li {
  font-size: 0.84rem;
  margin-bottom: 0.15rem;
}

.danger-list li::before {
  content: "✗";
  color: var(--accent-red);
}

.code-block.mono {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
}

.large-fp {
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.command-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .command-grid {
    grid-template-columns: 1fr;
  }
}
/* FAQ Grid & Cards */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.faq-card {
  padding: 1.4rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.faq-card:hover {
  transform: translateY(-3px);
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.faq-header h3 {
  margin: 0;
  font-size: 1rem;
}

.faq-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-card.expanded .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-card.expanded .faq-answer {
  opacity: 1;
  max-height: 200px;
}

.critical-card {
  border-left: 4px solid var(--accent-red-soft);
}

.warning-card {
  border-left: 4px solid var(--accent-blue);
}

/* Wiki Tabs */
.wiki-tabs {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0 1.8rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(8, 10, 18, 0.9);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.tab-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(58, 141, 255, 0.12);
  color: var(--text-main);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-neon));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 20px rgba(255, 56, 89, 0.6);
}

.wiki-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.3rem;
}

.wiki-grid.active-tab {
  display: grid;
}

.wiki-term {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.wiki-term h3 {
  margin: 0;
  font-size: 1rem;
}

.wiki-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.wiki-badge.core { 
  background: rgba(255, 56, 89, 0.2); 
  color: var(--accent-red); 
}

.wiki-badge.critical { 
  background: rgba(255, 71, 87, 0.25); 
  color: #ff4757; 
}

.wiki-badge.danger { 
  background: rgba(255, 107, 122, 0.25); 
  color: #ff6b7a; 
}

.wiki-badge.essential, .wiki-badge.verify { 
  background: rgba(58, 141, 255, 0.2); 
  color: var(--accent-blue); 
}

.wiki-badge.recommended { 
  background: rgba(0, 230, 118, 0.2); 
  color: #00e676; 
}

.wiki-badge.paranoid { 
  background: rgba(255, 193, 7, 0.25); 
  color: #ffc107; 
}

/* Responsive */
@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .wiki-tabs {
    gap: 0.5rem;
  }
  
  .tab-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
}
/* Privacy & Terms specific */
.policy-card, .terms-card {
  padding: 1.6rem;
}

.policy-icon, .policy-icon.large {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.policy-icon {
  background: rgba(58, 141, 255, 0.2);
  color: var(--accent-blue);
}

.policy-icon.large {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.dont-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(0, 230, 118, 0.08);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.dont-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #88d8a3;
  font-size: 0.86rem;
  font-weight: 500;
}

.dont-item i {
  font-size: 1rem;
  width: 16px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .policy-icon.large {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}
