:root {
  --blog-max-width: 70rem;
  --blog-border: #e2e8f0;
  --blog-radius: 1.5rem;
}

body.blog-index,
body.blog-page,
body.tags-page {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
}

.bg-slate-50 { background: #f8fafc; }
.bg-slate-100 { background: #f1f5f9; }
.bg-white { background: #fff; }
.bg-slate-900 { background: #0f172a; }
.text-white { color: #fff; }
.text-slate-900 { color: #0f172a; }
.text-slate-700 { color: #334155; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.text-slate-400 { color: #94a3b8; }
.text-blue-600 { color: #2563eb; }
.border { border: 1px solid transparent; }
.border-slate-200 { border-color: #e2e8f0; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex: 1 1 auto; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.grid { display: grid; }
.max-w-6xl { max-width: 72rem; }
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pb-4 { padding-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.hover\:underline:hover { text-decoration: underline; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }

.blog-hero {
  width: 100%;
  padding: clamp(1.5rem, 3vw, 3.5rem) 1.25rem 1rem;
}

.blog-hero__inner {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  background: linear-gradient(130deg, #eef2ff, #e0f2fe);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 2rem;
  padding: clamp(1.75rem, 3vw, 3.25rem);
  box-shadow: 0 30px 80px rgba(37, 99, 235, 0.18);
}

.blog-hero__eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-hero__title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0.6rem 0 0.75rem;
}

.blog-hero__text {
  max-width: 48rem;
  line-height: 1.65;
  color: #0f172a;
}

.blog-hero__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.blog-btn--primary {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
}

.blog-btn--secondary {
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
  background: #fff;
}

body.blog-page .blog-finder {
  width: 100%;
  padding: 0 1.25rem 2.5rem;
}

body.blog-page .blog-finder__inner {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  border: 1px solid var(--blog-border);
  border-radius: 1.75rem;
  background: #fff;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

body.blog-page .blog-finder__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.blog-page .blog-finder__title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

body.blog-page .blog-finder__hint {
  color: #475569;
  line-height: 1.6;
  max-width: 52rem;
}

body.blog-page .blog-finder__form { margin-top: 1rem; }

body.blog-page .blog-finder__input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
}

body.blog-page .blog-finder__icon {
  width: 1.1rem;
  height: 1.1rem;
  color: #64748b;
  flex: 0 0 auto;
}

body.blog-page .blog-finder__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #0f172a;
  min-width: 120px;
}

body.blog-page .blog-finder__input::placeholder { color: #94a3b8; }

body.blog-page .blog-finder__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
}

body.blog-page .blog-finder__clear svg {
  width: 1rem;
  height: 1rem;
}

body.blog-page .blog-finder__chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.blog-page .blog-finder__status {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

body.blog-page .blog-finder__count {
  font-weight: 600;
  color: #0f172a;
}

body.blog-page .blog-finder__sep { color: #cbd5e1; }

body.blog-page .blog-finder__jump {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

body.blog-page .blog-finder__noresults {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
}

.blog-chip.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

.tags-page {
  --tags-card-radius: 1.25rem;
  --tags-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.tags-hero {
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(135deg, #ffffff 0%, rgba(238, 242, 255, 0.7) 55%, rgba(245, 251, 255, 0.85) 100%);
  box-shadow: var(--tags-shadow);
}

.tags-hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.tags-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.15;
  font-weight: 800;
  margin: 0;
}

.tags-hero__subtitle {
  margin-top: 0.75rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #334155;
  max-width: 55ch;
}

.tags-stats { display: grid; gap: 0.75rem; }

.tags-stat {
  border-radius: var(--tags-card-radius);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.95rem 1rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.tags-stat__label { font-size: 0.82rem; color: #64748b; }
.tags-stat__value { margin-top: 0.25rem; font-weight: 800; font-size: 1.2rem; color: #0f172a; }

.tags-toolbar {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.tags-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 560px;
}

.tags-search__icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.tags-search__input {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 0.75rem 3.2rem 0.75rem 2.7rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.tags-search__input::placeholder { color: #94a3b8; font-weight: 500; }

.tags-search__clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(226, 232, 240, 0.85);
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tags-status { margin-top: 0.75rem; font-size: 0.95rem; color: #64748b; }

.tags-section {
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.tags-section--deferred {
  content-visibility: auto;
  contain-intrinsic-size: 1800px;
}

.tags-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.tag-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--tags-card-radius);
  background: linear-gradient(135deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 1));
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.tag-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tag-card__title {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #0f172a;
  text-decoration: none;
}

.tag-card__count {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(191, 219, 254, 0.85);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-card__descr { color: #475569; line-height: 1.55; font-size: 0.95rem; margin: 0; }

.tag-card__actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 38px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.tag-card__btn--primary {
  background: rgba(37, 99, 235, 1);
  color: #fff;
}

.tag-card__btn--ghost {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .tags-hero__grid { grid-template-columns: 1fr; }
  .tags-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
  .tags-grid { grid-template-columns: 1fr; }
  .tags-hero,
  .tags-section { padding: 1.1rem 1.15rem; }
  .blog-hero,
  body.blog-page .blog-finder { padding-left: 1rem; padding-right: 1rem; }
}
