:root {
  --ts-primary: #0077ff;
  --ts-secondary: #00c8ff;
  --ts-accent: #ff005c;
  --ts-dark: #07111f;
  --ts-light: #fff;
  --ts-site-width: 1180px;
  --ts-radius: 18px;
}

.ts-home-sections,
.ts-category-section,
.ts-related {
  max-width: var(--ts-site-width);
  margin: 32px auto;
  padding: 0 20px;
}

.ts-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 2px solid rgba(7,17,31,.1);
}

.ts-section-head h2 {
  position: relative;
  margin: 0;
  padding-bottom: 10px;
  color: var(--ts-dark);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.ts-section-head h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--ts-accent);
  vertical-align: middle;
}

.ts-section-head a {
  color: var(--ts-accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.ts-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.ts-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(7,17,31,.08);
  border-radius: var(--ts-radius);
  box-shadow: 0 12px 28px rgba(7,17,31,.08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ts-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,119,255,.28);
  box-shadow: 0 18px 42px rgba(7,17,31,.14);
}

.ts-card-image {
  display: block;
  aspect-ratio: 16/9;
  background: #eaf2fb;
  overflow: hidden;
  text-decoration: none;
}

.ts-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.ts-card:hover .ts-card-image img { transform: scale(1.05); }

.ts-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--ts-dark), #0b2b55);
  color: #fff;
  font-weight: 900;
}

.ts-card-body { padding: 16px; }

.ts-card-category,
.ts-card-category a {
  color: var(--ts-accent);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: .08em;
}

.ts-card-title {
  margin: 8px 0 10px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.03em;
}

.ts-card-title a { color: var(--ts-dark); text-decoration: none; }
.ts-card-title a:hover { color: var(--ts-primary); }

.ts-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #65758a;
  font-size: 12px;
  line-height: 1.4;
}

.ts-card-excerpt {
  margin: 0;
  color: #465568;
  font-size: 14px;
  line-height: 1.55;
}

.ts-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff7ff;
  color: var(--ts-primary);
  font-size: 13px;
  font-weight: 800;
}

.ts-reading-time svg { width: 16px; height: 16px; fill: currentColor; }

.ts-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 999999;
  pointer-events: none;
}
.ts-read-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--ts-primary), var(--ts-secondary));
}

.ts-toc {
  margin: 24px 0;
  padding: 18px;
  border-radius: var(--ts-radius);
  background: #f7fbff;
  border: 1px solid rgba(0,119,255,.14);
}
.ts-toc strong { display: block; margin-bottom: 8px; color: var(--ts-dark); }
.ts-toc ol { margin: 0; padding-left: 22px; }
.ts-toc a { color: var(--ts-dark); text-decoration: none; font-weight: 700; }
.ts-toc a:hover { color: var(--ts-primary); }

.ts-ad,
.ts-ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 140px;
  margin: 24px auto;
  padding: 18px;
  border: 1px dashed rgba(7,17,31,.22);
  border-radius: var(--ts-radius);
  background: #f7f9fc;
  color: #667085;
  text-align: center;
}

.ts-newsletter-box {
  margin: 24px auto;
  padding: 24px;
  border-radius: calc(var(--ts-radius) + 4px);
  background: radial-gradient(circle at top right, rgba(0,200,255,.2), transparent 35%), linear-gradient(135deg, var(--ts-dark), #0b1d35);
  color: #fff;
  box-shadow: 0 18px 42px rgba(7,17,31,.18);
}
.ts-newsletter-box h3 { color: #fff; margin: 0 0 10px; font-size: 24px; line-height: 1.1; }
.ts-newsletter-box p { color: #c8d3e1; }
.ts-mini-label { display: inline-block; margin-bottom: 10px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.1); color: #63d7ff; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.ts-button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 999px; background: var(--ts-primary); color: #fff !important; text-decoration: none; font-weight: 900; }
.ts-button:hover { background: var(--ts-secondary); }

@media (max-width: 900px) { .ts-post-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) {
  .ts-home-sections, .ts-category-section, .ts-related { padding: 0 14px; }
  .ts-post-grid { grid-template-columns: 1fr; }
  .ts-card-title { font-size: 17px; }
}
