/* ============================================
   tehnobzorik.ru — Global Stylesheet
   Стиль: Bright Friendly Tech Blog
   ============================================ */

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

/* ─── Variables ─── */
:root {
  --indigo:      #3730a3;
  --indigo-mid:  #4338ca;
  --indigo-lt:   #eef2ff;
  --violet:      #7c3aed;
  --violet-lt:   #f5f3ff;
  --amber:       #f59e0b;
  --amber-lt:    #fffbeb;
  --emerald:     #10b981;
  --emerald-lt:  #ecfdf5;
  --rose:        #f43f5e;
  --rose-lt:     #fff1f2;
  --sky:         #0ea5e9;
  --sky-lt:      #f0f9ff;
  --ink:         #0f0e17;
  --dark:        #1a1929;
  --slate:       #334155;
  --mid:         #64748b;
  --muted:       #94a3b8;
  --pale:        #cbd5e1;
  --bg:          #f8f9fc;
  --bg-card:     #ffffff;
  --rule:        #e2e8f0;
  --shadow-sm:   0 1px 6px rgba(15,14,23,.06);
  --shadow-md:   0 4px 20px rgba(15,14,23,.1);
  --shadow-lg:   0 12px 44px rgba(15,14,23,.15);
  --shadow-xl:   0 24px 64px rgba(15,14,23,.2);
  --r:           8px;
  --r-lg:        16px;
  --r-xl:        24px;
  --font:        'Onest', system-ui, sans-serif;
  --max-w:       1180px;
  --t:           .2s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--slate);
  line-height: 1.68;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }

/* ─── ADS ─── */
.ad-zone {
  background: #f1f3f9;
  border: 1px dashed var(--rule);
  text-align: center;
  padding: 10px;
  margin: 18px 0;
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .5px;
  border-radius: var(--r);
}
.ad-zone-header { border-radius: 0; margin: 0; }

/* ─── HEADER ─── */
.site-header {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-blob {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--indigo-mid), var(--violet));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(124,58,237,.25);
}
.logo-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
}
.logo-name span { color: var(--amber); }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  color: rgba(255,255,255,.55);
  font-size: .84rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r);
  white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* ─── HERO ─── */
.hero {
  background: var(--ink);
  padding: 0;
  overflow: hidden;
  position: relative;
}
/* Gradient blobs */
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(67,56,202,.35) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,.2) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 22px 72px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
  position: relative; z-index: 1;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 5px 14px;
  border-radius: 40px;
  margin-bottom: 18px;
}
.hero-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); }
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.6px;
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-sub {
  color: rgba(255,255,255,.55);
  font-size: .97rem;
  line-height: 1.65;
  max-width: 420px;
  margin-bottom: 28px;
  font-weight: 400;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-topic {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 40px;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.hero-topic:hover {
  background: var(--indigo-mid);
  border-color: var(--indigo-mid);
  color: #fff;
}

/* Hero right: score cards */
.hero-cards { display: flex; flex-direction: column; gap: 10px; }
.hero-score-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background var(--t);
  cursor: default;
}
.hero-score-card:hover { background: rgba(255,255,255,.1); }
.hsc-emoji { font-size: 1.5rem; flex-shrink: 0; }
.hsc-info { flex: 1; }
.hsc-name { font-size: .9rem; font-weight: 600; color: #fff; line-height: 1.3; }
.hsc-cat { font-size: .72rem; color: rgba(255,255,255,.4); margin-top: 1px; }
.hsc-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--amber);
  flex-shrink: 0;
  letter-spacing: -.5px;
}

/* ─── TOPICS BAR ─── */
.topics-bar { background: #fff; border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-sm); }
.topics-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 22px;
  display: flex; overflow-x: auto; scrollbar-width: none;
  height: 50px; align-items: center; gap: 6px;
}
.topics-inner::-webkit-scrollbar { display: none; }
.topics-inner a {
  white-space: nowrap; font-size: .8rem; font-weight: 600;
  color: var(--mid); padding: 6px 15px; border-radius: 40px;
  border: 1px solid var(--rule);
  transition: background var(--t), color var(--t), border-color var(--t);
  flex-shrink: 0;
}
.topics-inner a:hover {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}

/* ─── SECTION ─── */
.sec { padding: 60px 0; }
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
}
.sec-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--indigo-mid);
  background: var(--indigo-lt); padding: 4px 12px; border-radius: 40px;
  margin-bottom: 6px;
}
.sec-title {
  font-size: 1.8rem; font-weight: 800; color: var(--ink);
  letter-spacing: -.4px; line-height: 1.2;
}
.sec-all {
  font-size: .78rem; font-weight: 600; color: var(--indigo-mid);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; transition: gap var(--t);
}
.sec-all:hover { gap: 8px; }

/* ─── ARTICLE GRID ─── */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: #c7d2fe;
}
.card-thumb { overflow: hidden; height: 196px; position: relative; background: var(--indigo-lt); }
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.article-card:hover .card-thumb img { transform: scale(1.05); }
.card-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: #fff;
  font-size: .64rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
}
.card-rating {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(15,14,23,.75); backdrop-filter: blur(6px);
  color: var(--amber); font-size: .8rem; font-weight: 800;
  padding: 4px 10px; border-radius: var(--r);
}
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-meta { font-size: .71rem; color: var(--muted); margin-bottom: 7px; display: flex; gap: 8px; }
.card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--ink);
  margin-bottom: 9px; letter-spacing: -.2px; transition: color var(--t);
}
.article-card:hover .card-title { color: var(--indigo-mid); }
.card-desc { font-size: .85rem; color: var(--mid); line-height: 1.6; flex: 1; margin-bottom: 15px; }
.card-read {
  font-size: .73rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--indigo-mid);
  display: flex; align-items: center; gap: 4px; transition: gap var(--t);
}
.article-card:hover .card-read { gap: 8px; }

/* ─── ARTICLE PAGE ─── */
.page-wrap {
  max-width: var(--max-w); margin: 0 auto;
  padding: 44px 22px 72px;
  display: grid; grid-template-columns: 1fr 294px; gap: 40px; align-items: start;
}
.article-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--rule); }
.a-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--indigo-lt); color: var(--indigo-mid);
  font-size: .68rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 5px 12px; border-radius: 40px;
  margin-bottom: 12px;
}
.a-rating-badge {
  float: right;
  background: var(--ink); color: var(--amber);
  border-radius: var(--r-lg);
  padding: 10px 18px; text-align: center;
  margin: 0 0 14px 14px;
}
.a-rating-badge .r-val { font-size: 2rem; font-weight: 900; line-height: 1; }
.a-rating-badge .r-label { font-size: .62rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: 1px; display: block; margin-top: 2px; }
.article-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; line-height: 1.12;
  letter-spacing: -.5px; color: var(--ink); margin-bottom: 14px;
}
.article-title em { font-style: normal; color: var(--indigo-mid); }
.article-meta { display: flex; align-items: center; gap: 14px; font-size: .76rem; color: var(--muted); flex-wrap: wrap; }

/* ─── BODY ─── */
.article-body { font-size: 1rem; line-height: 1.8; color: var(--mid); }
.article-body > p:first-of-type { font-size: 1.07rem; color: var(--slate); font-weight: 500; }
.article-body h2 {
  font-size: 1.45rem; font-weight: 800; color: var(--ink);
  margin: 36px 0 13px; letter-spacing: -.3px;
  padding-left: 14px; border-left: 4px solid var(--indigo-mid);
}
.article-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--slate); margin: 24px 0 10px; }
.article-body p { margin-bottom: 15px; }
.article-body ul, .article-body ol {
  margin: 13px 0 19px; display: flex; flex-direction: column; gap: 8px;
}
.article-body ul li { padding-left: 22px; position: relative; }
.article-body ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--indigo-mid); font-size: .8rem; top: 2px;
}
.article-body ol { counter-reset: li; }
.article-body ol li { padding-left: 36px; position: relative; counter-increment: li; }
.article-body ol li::before {
  content: counter(li);
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px;
  background: var(--indigo-lt); color: var(--indigo-mid);
  font-size: .73rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border-radius: 6px;
}
.article-img { margin: 24px 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--rule); }
.article-img img { width: 100%; height: 360px; object-fit: cover; }
.article-img figcaption { font-size: .77rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--rule); }

/* Spec table */
.spec-table { margin: 22px 0; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-head {
  background: var(--ink); color: rgba(255,255,255,.8);
  font-size: .67rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 11px 18px;
  display: flex; align-items: center; gap: 8px;
}
.spec-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.spec-row {
  display: flex; align-items: flex-start; padding: 11px 18px;
  border-bottom: 1px solid var(--rule); font-size: .87rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(even) { background: #fafafe; }
.spec-key { color: var(--muted); width: 160px; flex-shrink: 0; font-size: .8rem; font-weight: 600; padding-top: 1px; }
.spec-val { color: var(--slate); font-weight: 500; }
.spec-val.good { color: #15803d; font-weight: 600; }
.spec-val.ok   { color: #b45309; font-weight: 600; }
.spec-val.bad  { color: #b91c1c; font-weight: 600; }

/* Score card */
.score-card {
  background: linear-gradient(135deg, var(--ink), #1e1b3e);
  border-radius: var(--r-lg);
  padding: 22px 24px; margin: 24px 0;
}
.score-card-head {
  font-size: .67rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--amber); margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.sg-item { text-align: center; }
.sg-val { font-size: 1.4rem; font-weight: 900; color: var(--amber); line-height: 1; }
.sg-label { font-size: .66rem; color: rgba(255,255,255,.4); margin-top: 3px; }
.sg-bar { height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.sg-fill { height: 100%; background: linear-gradient(90deg, var(--indigo-mid), var(--amber)); border-radius: 2px; }
.score-verdict {
  font-size: .87rem; color: rgba(255,255,255,.65); line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px;
}
.score-verdict strong { color: var(--amber); }

/* Pro/con */
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.procon-col { background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 16px 18px; }
.pc-title { font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.pc-title.plus { color: var(--emerald); }
.pc-title.minus { color: var(--rose); }
.pc-list { display: flex; flex-direction: column; gap: 7px; }
.pc-list li { font-size: .84rem; color: var(--mid); padding-left: 18px; position: relative; }
.pc-list.plus li::before { content: '+'; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }
.pc-list.minus li::before { content: '−'; position: absolute; left: 0; color: var(--rose); font-weight: 800; }

/* Note / tip */
.tip-box {
  background: var(--amber-lt); border-left: 4px solid var(--amber);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 14px 18px; margin: 18px 0; font-size: .9rem;
}
.tip-box strong { color: #92400e; }
.info-box {
  background: var(--indigo-lt); border-left: 4px solid var(--indigo-mid);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 14px 18px; margin: 18px 0; font-size: .9rem;
}
.info-box strong { color: var(--indigo); }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  max-width: var(--max-w); margin: 0 auto; padding: 14px 22px 0;
  display: flex; align-items: center; gap: 8px;
  font-size: .77rem; color: var(--muted); flex-wrap: wrap;
}
.breadcrumb a { color: var(--mid); transition: color var(--t); }
.breadcrumb a:hover { color: var(--indigo-mid); }

/* ─── SIDEBAR ─── */
.sidebar { position: sticky; top: 78px; }
.sw { background: var(--bg-card); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.sw-title {
  background: var(--ink); color: rgba(255,255,255,.8);
  font-size: .68rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 11px 17px;
  display: flex; align-items: center; gap: 8px;
}
.sw-title .amber { color: var(--amber); }
.sw-links { padding: 6px 0; }
.sw-links a {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 17px; border-left: 3px solid transparent;
  transition: background var(--t), border-color var(--t);
  font-size: .84rem; color: var(--mid); line-height: 1.38;
}
.sw-links a:hover { background: var(--indigo-lt); border-left-color: var(--indigo-mid); color: var(--ink); }
.sw-links a .n { flex-shrink: 0; font-size: .8rem; font-weight: 800; color: var(--amber); margin-top: 2px; min-width: 20px; }
.sw-inner { padding: 14px 17px; }
.top-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: .83rem;
}
.top-row:last-child { border-bottom: none; }
.top-row strong { font-weight: 800; color: var(--amber); font-size: .9rem; }

/* ─── FOOTER ─── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.38); margin-top: 72px; }
.footer-top {
  max-width: var(--max-w); margin: 0 auto; padding: 52px 22px 40px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand p { font-size: .84rem; line-height: 1.7; max-width: 280px; margin-top: 12px; }
.footer-col h4 { font-size: .67rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .83rem; transition: color var(--t); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto; padding: 18px 22px;
  display: flex; justify-content: space-between; font-size: .76rem; flex-wrap: wrap; gap: 8px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cards { display: none; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .procon { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
  .site-nav a { font-size: .76rem; padding: 7px 8px; }
  .footer-top { grid-template-columns: 1fr; }
  .spec-key { width: 110px; }
}
