:root {
  --bg-deep: #05070a;
  --bg-surface: #0f131f;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glow: 0 0 40px rgba(59, 130, 246, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-deep);
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
}
.orb-1 { width: 500px; height: 500px; background: #1e3a8a; top: -120px; left: -80px; }
.orb-2 { width: 420px; height: 420px; background: #4c1d95; bottom: -80px; right: -60px; }

.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

html {
  scroll-padding-top: 96px;
}

.articles-page,
.article-page {
  padding: 132px 0 60px;
  scroll-margin-top: 96px;
}

.articles-page .breadcrumb {
  margin-bottom: 20px;
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo i { color: var(--accent-blue); }
.nav-btn {
  padding: 8px 16px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
}
.nav-btn:hover { background: rgba(255,255,255,0.1); }

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .nav-links { gap: 6px; }
  .nav-links .nav-btn { padding: 6px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
  header .nav-flex { flex-wrap: wrap; gap: 10px; }
  .nav-links { width: 100%; justify-content: center; }
  .nav-links .nav-btn:nth-child(n+4):not(:last-child) { display: none; }
}

.module-hero {
  padding: 120px 0 40px;
}
.module-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.module-hero h1 span {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.module-hero .lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 28px;
}
.price-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 24px;
}
.price-badge strong { font-size: 22px; }
.price-badge span { color: var(--text-muted); font-size: 14px; }

.module-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  position: sticky;
  top: 64px;
  z-index: 50;
  padding: 12px 0;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
}
.module-tabs a {
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  transition: all 0.2s;
}
.module-tabs a:hover,
.module-tabs a.active {
  color: #fff;
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.15);
}

.section-block {
  padding: 48px 0;
  border-top: 1px solid var(--glass-border);
}
.section-block h2 {
  font-size: 26px;
  margin-bottom: 16px;
}
.section-block p {
  color: var(--text-muted);
  margin-bottom: 12px;
}
.section-block ul {
  color: var(--text-muted);
  margin: 12px 0 12px 24px;
}
.section-block li { margin-bottom: 8px; }

.video-placeholder {
  aspect-ratio: 16/9;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-top: 20px;
}

.materials-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.article-card {
  display: block;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  transition: all 0.25s;
}
.article-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.article-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #fff;
}
.article-card time {
  font-size: 13px;
  color: var(--text-muted);
}

/* Blog index (как gramgpt.io/blogs) */
.blog-hero {
  max-width: 720px;
  margin-bottom: 36px;
}
.blog-hero h1 {
  font-size: clamp(32px, 4.5vw, 42px);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.blog-hero .lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.55;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.blog-card-cover {
  margin: -22px -24px 16px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.25);
}
.blog-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-cover--compact-sm {
  aspect-ratio: auto;
  max-height: 140px;
}
.blog-card-cover--compact-sm img {
  max-height: 140px;
  height: auto;
  width: 100%;
  object-fit: cover;
}
.blog-card--compact-sm {
  min-height: 140px;
}
.blog-card-cover--compact {
  aspect-ratio: auto;
  max-height: 200px;
}
.blog-card-cover--compact img {
  max-height: 200px;
  height: auto;
  width: 100%;
  object-fit: cover;
}
.blog-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  min-height: 168px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.blog-card-tag {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.blog-card-tag--safety { color: #34d399; }
.blog-card-tag--promo { color: #60a5fa; }
.blog-card-tag--setup { color: #a78bfa; }
.blog-card time {
  color: var(--text-muted);
  font-size: 13px;
}
.blog-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}
.blog-card-excerpt {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.blog-footer-note {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  font-size: 14px;
  color: var(--text-muted);
}
.blog-footer-note a {
  color: var(--accent-blue);
  text-decoration: none;
}
.blog-footer-note a:hover { text-decoration: underline; }

.blog-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 96px;
}

.blog-sidebar-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.blog-cat-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.blog-cat-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
}

.blog-cat-btn.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
}

.blog-cat-count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.blog-cat-btn.active .blog-cat-count {
  color: #93c5fd;
}

.blog-main .blog-grid {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.blog-card.is-hidden {
  display: none;
}

.blog-empty {
  display: none;
  padding: 32px 20px;
  border-radius: 12px;
  border: 1px dashed var(--glass-border);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.blog-empty.is-visible {
  display: block;
}

@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-sidebar {
    position: static;
  }
  .blog-cat-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .blog-cat-btn {
    width: auto;
    padding: 8px 14px;
  }
  .blog-main .blog-grid {
    max-width: none;
  }
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
}
.faq-item h3 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { color: var(--text-muted); font-size: 15px; }

.pricing-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.pricing-mini .card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--bg-surface);
  text-align: center;
}
.pricing-mini .card.popular {
  border-color: var(--accent-blue);
  box-shadow: var(--glow);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  margin-top: 16px;
}
.btn-glow {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
}
.btn-glass {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: #fff;
}

/* Article page */
.article-page .meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.article-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  margin-bottom: 20px;
}
.article-cover {
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}
.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.article-cover--compact {
  max-width: min(820px, 92%);
  margin-left: auto;
  margin-right: auto;
}
.article-body h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  color: #fff;
}
.article-body h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: #e2e8f0;
}
.article-body p,
.article-body li {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 16px;
}
.article-body ul, .article-body ol {
  margin: 12px 0 16px 28px;
}
.article-body strong { color: #e2e8f0; }
.article-body code {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 14px;
}
.tip-box {
  padding: 16px 20px;
  border-radius: 12px;
  border-left: 3px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
  margin: 20px 0;
}
.tip-box p { margin: 0; color: #cbd5e1; }

footer {
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
footer a { color: var(--accent-blue); text-decoration: none; }

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--accent-blue); text-decoration: none; }
/* TeleRocket site — светлая тема, электро-синий */
html.theme-light {
  --bg-deep: #eef6ff;
  --bg-surface: #ffffff;
  --accent-blue: #0077ff;
  --accent-purple: #4f46e5;
  --text-main: #0c1929;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(0, 119, 255, 0.2);
  --glow: 0 12px 40px rgba(0, 119, 255, 0.14);
}

html.theme-light body {
  background-color: var(--bg-deep);
  color: var(--text-main);
}

html.theme-light .ambient-bg {
  background: linear-gradient(160deg, #f0f9ff 0%, #dbeafe 42%, #f8fafc 100%);
}

html.theme-light .orb-1 { background: #38bdf8; opacity: 0.38; }
html.theme-light .orb-2 { background: #2563eb; opacity: 0.28; }
html.theme-light .orb-3 { background: #22d3ee; opacity: 0.32; }

html.theme-light .grid-overlay {
  background-image:
    linear-gradient(rgba(0, 119, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 119, 255, 0.05) 1px, transparent 1px);
}

html.theme-light header,
html.theme-light header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 119, 255, 0.16);
  box-shadow: 0 4px 24px rgba(0, 100, 255, 0.07);
}

html.theme-light .logo { color: #0f172a; }
html.theme-light .logo i { color: #0077ff; }

html.theme-light .nav-btn {
  color: #1e3a5f;
  background: rgba(0, 119, 255, 0.07);
  border-color: rgba(0, 119, 255, 0.22);
}
html.theme-light .nav-btn:hover {
  color: #0055cc;
  background: rgba(0, 119, 255, 0.14);
  border-color: rgba(0, 119, 255, 0.38);
}

html.theme-light .theme-toggle-btn {
  color: #0077ff;
  background: rgba(0, 119, 255, 0.1);
  border-color: rgba(0, 119, 255, 0.28);
}
html.theme-light .theme-toggle-btn:hover {
  background: rgba(0, 119, 255, 0.18);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

html.theme-light .hero h1 { color: #0f172a; }
html.theme-light .hero h1 span,
html.theme-light .section-title span,
html.theme-light .module-hero h1 span {
  background: linear-gradient(135deg, #0077ff 0%, #22d3ee 55%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.theme-light .section-title { color: #0f172a; }
html.theme-light .feature-card h3 { color: #0f172a; }
html.theme-light .price-val { color: #0f172a; }
html.theme-light .article-card h3 { color: #0f172a; }

html.theme-light .btn-glass {
  color: #1e40af;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 119, 255, 0.25);
}
html.theme-light .btn-glass:hover {
  background: #fff;
  border-color: rgba(0, 119, 255, 0.45);
  box-shadow: 0 8px 24px rgba(0, 119, 255, 0.12);
}

html.theme-light .btn-glow {
  background: linear-gradient(135deg, #0077ff, #22d3ee);
  box-shadow: 0 8px 28px rgba(0, 119, 255, 0.35);
}

html.theme-light .feature-card:hover {
  box-shadow: 0 20px 50px rgba(0, 119, 255, 0.12);
  border-color: rgba(0, 119, 255, 0.35);
}

html.theme-light .price-card {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 119, 255, 0.06);
}
html.theme-light .price-card.popular {
  background: linear-gradient(180deg, rgba(0, 119, 255, 0.1) 0%, #fff 100%);
  border-color: #0077ff;
}

html.theme-light section[style*="rgba(0,0,0,0.2)"] {
  background: rgba(0, 119, 255, 0.06) !important;
}

html.theme-light .advantages-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(224, 242, 254, 0.6));
  border-color: rgba(0, 119, 255, 0.18);
}
html.theme-light .adv-item:hover {
  background: rgba(0, 119, 255, 0.06);
}

html.theme-light .blog-card {
  background: #fff;
  border-color: rgba(0, 119, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 119, 255, 0.06);
}
html.theme-light .blog-card:hover {
  border-color: rgba(0, 119, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 119, 255, 0.14);
}
html.theme-light .blog-card h2 { color: #0f172a; }
html.theme-light .blog-cat-btn.active {
  color: #0055cc;
  background: rgba(0, 119, 255, 0.12);
  border-color: rgba(0, 119, 255, 0.3);
}
html.theme-light .blog-cat-btn:hover {
  color: #1e40af;
  background: rgba(0, 119, 255, 0.08);
}

html.theme-light .article-page h1 { color: #0f172a; }
html.theme-light .article-body h2 { color: #0c4a6e; }
html.theme-light .article-body h3 { color: #1e3a5f; }
html.theme-light .article-body strong { color: #0f172a; }
html.theme-light .article-body code {
  background: rgba(0, 119, 255, 0.08);
  color: #0055cc;
}
html.theme-light .tip-box {
  background: rgba(0, 119, 255, 0.08);
  border-left-color: #0077ff;
}
html.theme-light .tip-box p { color: #334155; }

html.theme-light .module-tabs {
  background: rgba(238, 246, 255, 0.95);
}
html.theme-light .module-tabs a:hover,
html.theme-light .module-tabs a.active {
  color: #0055cc;
  background: rgba(0, 119, 255, 0.12);
}

html.theme-light .section-block h2 { color: #0f172a; }
html.theme-light footer p[style*="color: #fff"] { color: #0f172a !important; }
html.theme-light .breadcrumb a { color: #0077ff; }
html.theme-light .article-card:hover,
html.theme-light .blog-card-tag--safety { color: #059669; }
html.theme-light .blog-card-tag--promo { color: #0077ff; }
html.theme-light .blog-card-tag--setup { color: #7c3aed; }

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: #fbbf24;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}
