/* SangAI Blog stylesheet — matches SangAI dark cybernetic theme. */
:root {
  color-scheme: dark;
  --bg: #05060c;
  --panel: #0a0f1a;
  --panel-hover: #0e1524;
  --line: #16303c;
  --line-focus: #2ddbf0;
  --cy: #2ddbf0;
  --ink: #d7f3fa;
  --body: #b8d3dc;
  --muted: #5f8ea0;
  --card-bg: rgba(10, 15, 26, 0.85);
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(45, 219, 240, 0.06), transparent 70%), var(--bg);
  color: var(--body);
}

a {
  color: var(--cy);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Nav header */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px 12px 40px;
  background: rgba(5, 6, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.blog-nav-title {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.blog-nav-title h1,
.blog-nav-title p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-nav-title h1 {
  font: 700 20px/1.25 var(--mono);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.blog-nav-title p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .blog-nav { flex-wrap: wrap; padding: 10px 16px 10px 20px; row-gap: 6px; }
  .blog-nav-title { flex: 1 0 100%; order: 3; text-align: left; }
}

.blog-nav-left, .blog-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 20px/1 var(--mono);
  color: var(--ink);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.blog-brand:hover { text-decoration: none; }
.blog-brand-ai {
  background: linear-gradient(90deg, hsl(var(--brand-h) 85% 58%), hsl(calc(var(--brand-h) + 70) 85% 58%), hsl(calc(var(--brand-h) + 140) 85% 62%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.blog-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.blog-nav-link {
  color: var(--muted);
  font: 13px/1.2 var(--mono);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.blog-nav-link:hover, .blog-nav-link.active {
  color: var(--ink);
  background: rgba(45, 219, 240, 0.12);
  text-decoration: none;
}

/* Main Container — standard Bootstrap responsive breakpoints */
.blog-container,
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 32px 20px 80px;
  flex: 1 0 auto;
}

@media (min-width: 576px) {
  .blog-container, .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .blog-container, .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .blog-container, .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .blog-container, .container { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .blog-container, .container { max-width: 1320px; }
}

/* Header Language Menu with Flags */
.lang-menu {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(10, 15, 26, 0.75);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 4px;
}
.lang-flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font: 12px/1 var(--mono);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.lang-flag-btn .flag-emoji {
  font-size: 15px;
  line-height: 1;
}
.lang-flag-btn:hover {
  color: var(--ink);
}
.lang-flag-btn.active {
  background: rgba(45, 219, 240, 0.2);
  color: var(--cy);
  font-weight: 600;
}

/* Hero */
.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  margin-bottom: 16px;
  background: rgba(14, 24, 42, 0.85);
  border: 1px solid rgba(45, 219, 240, 0.35);
  border-radius: 20px;
  font: 600 11px/1 var(--mono);
  color: #2ddbf0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(45, 219, 240, 0.2);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot-anim 2s infinite ease-in-out;
}
@keyframes pulse-dot-anim {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 12px #10b981; }
}


/* Client AI Hardware Telemetry Bar */
.ai-hardware-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin: 24px auto 0;
  padding: 10px 18px;
  max-width: 860px;
  background: linear-gradient(135deg, rgba(8, 14, 26, 0.9), rgba(5, 9, 18, 0.95));
  border: 1px solid rgba(45, 219, 240, 0.25);
  border-radius: 12px;
  font: 11px/1.3 var(--mono);
  color: var(--muted);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(45, 219, 240, 0.15);
  backdrop-filter: blur(12px);
}
.hw-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hw-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ddbf0;
  box-shadow: 0 0 6px #2ddbf0;
  animation: pulse-dot-anim 1.8s infinite ease-in-out;
}
.hw-label {
  color: #7b9bb0;
}
.hw-value {
  color: #e2f4f8;
  font-weight: 500;
}
.hw-value.hw-ok {
  color: #34d399;
}
.hw-value.hw-warn {
  color: #fbbf24;
}
.hw-value.hw-muted {
  color: #94a3b8;
}
.hw-highlight {
  color: #2ddbf0;
  font-weight: 600;
}

/* Filter controls */
.blog-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.blog-trending-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 6px;
  font: 12px/1.3 var(--mono);
}
.trending-label {
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 2px;
}
.trending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.trending-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8;
  font: 11px/1.2 var(--mono);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.trending-tag:hover {
  background: rgba(45, 219, 240, 0.12);
  border-color: rgba(45, 219, 240, 0.5);
  color: #2ddbf0;
  transform: translateY(-1px);
}
.trending-tag.active {
  background: rgba(45, 219, 240, 0.22);
  border-color: #2ddbf0;
  color: #2ddbf0;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(45, 219, 240, 0.3);
}

.blog-search-bar {
  position: relative;
  width: 100%;
}
.blog-search-input {
  width: 100%;
  padding: 12px 48px 12px 42px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: 14px/1.4 var(--mono);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blog-search-input:focus {
  border-color: var(--cy);
  box-shadow: 0 0 0 2px rgba(45, 219, 240, 0.2);
}
.blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.search-kbd-hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search-kbd-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  font: 600 11px/1.2 var(--mono);
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Category & Tag Taxonomy Filter Bar */
.blog-categories, .blog-tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.cat-pill, .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid rgba(45, 219, 240, 0.22);
  border-radius: 20px;
  background: rgba(8, 14, 26, 0.7);
  color: var(--muted);
  font: 12px/1.3 var(--mono);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  user-select: none;
}
.cat-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.85;
  flex-shrink: 0;
}
.cat-icon svg {
  width: 100%;
  height: 100%;
}
.cat-count, .tag-pill-count {
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 600;
  color: #7b9bb0;
  margin-left: 2px;
}
.cat-pill:hover, .tag-pill:hover {
  color: #d7f3fa;
  border-color: rgba(45, 219, 240, 0.55);
  background: rgba(45, 219, 240, 0.12);
  transform: translateY(-1px);
}
.cat-pill.active, .tag-pill.active {
  background: linear-gradient(135deg, rgba(45, 219, 240, 0.25), rgba(20, 160, 220, 0.2));
  border-color: #2ddbf0;
  color: #2ddbf0;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(45, 219, 240, 0.35);
}
.cat-pill.active .cat-count, .tag-pill.active .tag-pill-count {
  background: rgba(45, 219, 240, 0.25);
  color: #2ddbf0;
}

.blog-quick-pills {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.blog-quick-pills[hidden] {
  display: none;
}
.blog-quick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid rgba(45, 219, 240, 0.22);
  background: rgba(8, 14, 26, 0.7);
  color: var(--muted);
  font: 500 12px/1.3 var(--mono);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.blog-quick-pill:hover {
  color: var(--ink);
  border-color: rgba(45, 219, 240, 0.55);
  background: rgba(45, 219, 240, 0.12);
}
.blog-quick-pill:focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
}
.blog-quick-pill.active {
  background: linear-gradient(135deg, rgba(45, 219, 240, 0.25), rgba(20, 160, 220, 0.2));
  border-color: var(--cy);
  color: var(--cy);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(45, 219, 240, 0.3);
}

/* Active Filters Indicator */
.blog-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 14px;
  background: rgba(12, 20, 36, 0.6);
  border: 1px dashed rgba(45, 219, 240, 0.35);
  border-radius: 8px;
  font: 12px/1.4 var(--mono);
  color: var(--muted);
}
.active-filter-label {
  color: #94a3b8;
  font-weight: 500;
}
.active-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(45, 219, 240, 0.2);
  border: 1px solid #2ddbf0;
  border-radius: 14px;
  color: #2ddbf0;
  font-weight: 600;
}
.btn-clear-tag {
  background: transparent;
  border: none;
  color: #2ddbf0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease;
}
.btn-clear-tag:hover {
  color: #ffffff;
  transform: scale(1.25);
}
.btn-reset-filters {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #94a3b8;
  font: 11px/1.2 var(--mono);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-reset-filters:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.btn-empty-reset {
  margin-top: 14px;
  margin-left: 0;
}

/* Load More Pagination */
.blog-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 40px auto 20px;
  text-align: center;
}
.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 26, 48, 0.9), rgba(8, 16, 32, 0.95));
  border: 1px solid rgba(45, 219, 240, 0.45);
  color: #d7f3fa;
  font: 600 14px/1.2 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 10px rgba(45, 219, 240, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 220px;
}
.btn-load-more:hover {
  color: #2ddbf0;
  border-color: #2ddbf0;
  background: linear-gradient(135deg, rgba(20, 38, 70, 0.95), rgba(12, 24, 46, 0.98));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(45, 219, 240, 0.4);
  transform: translateY(-2px);
}
.btn-load-more:active {
  transform: translateY(0);
}
.blog-load-more-count {
  margin: 0;
  font: 12px/1.3 var(--mono);
  color: var(--muted);
}

/* View Mode Toolbar */
.blog-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 24px;
  padding: 8px 14px;
  background: rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(45, 219, 240, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}
.blog-view-modes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 10, 20, 0.7);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #7b9bb0;
  font: 600 12px/1.2 var(--mono);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.view-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.view-btn:hover {
  color: #e2f4f8;
  background: rgba(255, 255, 255, 0.05);
}
.view-btn.active {
  background: rgba(45, 219, 240, 0.18);
  border-color: rgba(45, 219, 240, 0.45);
  color: #2ddbf0;
  box-shadow: 0 0 10px rgba(45, 219, 240, 0.2);
}
.blog-stats-counter {
  font: 12px/1.3 var(--mono);
  color: #7b9bb0;
}

/* Universal hidden attribute respect */
[hidden],
.blog-grid[hidden],
.blog-list-view[hidden],
.blog-graph-container[hidden],
.blog-empty[hidden],
.blog-active-filters[hidden],
.blog-load-more-wrap[hidden] {
  display: none !important;
}

/* List View */
.blog-list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blog-list-item {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  overflow: hidden;
}
@media (min-width: 640px) {
  .blog-list-item {
    flex-direction: row;
    align-items: stretch;
  }
}
.blog-list-item:hover {
  border-color: rgba(45, 219, 240, 0.6);
  background: rgba(14, 26, 48, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* 30% image thumbnail container in list view */
.blog-list-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060914;
  overflow: hidden;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .blog-list-thumb {
    width: 30%;
    min-width: 180px;
    max-width: 340px;
    aspect-ratio: 16 / 10;
  }
}
.blog-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
}
.blog-list-item:hover .blog-list-thumb img {
  transform: scale(1.04);
}

.blog-list-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  min-width: 0;
}
.blog-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.blog-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 11px/1.2 var(--mono);
  color: var(--muted);
  flex-wrap: wrap;
}
.blog-list-cat {
  position: static;
  margin-left: 2px;
  font-size: 10px;
  padding: 2px 7px;
  box-shadow: none;
}
.blog-list-title {
  font: 600 16px/1.35 var(--mono);
  color: var(--ink);
  margin: 0;
  transition: color 0.15s ease;
}
.blog-list-item:hover .blog-list-title {
  color: #2ddbf0;
}
.blog-list-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.blog-list-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 11px/1.2 var(--mono);
  color: var(--muted);
}
.blog-list-link {
  color: var(--cy);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.blog-list-item:hover .blog-list-link {
  color: #ffffff;
  transform: translateX(2px);
}

/* Interactive Node Knowledge Graph View */
.blog-graph-container {
  position: relative;
  width: 100%;
  height: 620px;
  min-height: 460px;
  background: radial-gradient(circle at center, #0a1426 0%, #03060d 100%);
  border: 1px solid rgba(45, 219, 240, 0.28);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.85), 0 8px 32px rgba(0, 0, 0, 0.5);
}
.blog-graph-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
.blog-graph-canvas:active {
  cursor: grabbing;
}
.blog-graph-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  font: 11px/1.3 var(--mono);
}
.graph-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(8, 14, 26, 0.88);
  border: 1px solid rgba(45, 219, 240, 0.35);
  border-radius: 20px;
  color: #a8d5e5;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.graph-controls-btns {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.graph-ctrl-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(8, 14, 26, 0.85);
  border: 1px solid rgba(45, 219, 240, 0.3);
  color: #2ddbf0;
  font: 600 12px/1 var(--mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.graph-ctrl-btn:hover {
  background: rgba(45, 219, 240, 0.22);
  border-color: #2ddbf0;
  color: #ffffff;
}
.graph-tooltip-card {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 18, 34, 0.96);
  border: 1px solid #2ddbf0;
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 290px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(45, 219, 240, 0.3);
  backdrop-filter: blur(12px);
  z-index: 10;
  font: 12px/1.4 var(--mono);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.graph-tooltip-card.visible {
  opacity: 1;
  transform: scale(1);
}
.graph-tooltip-title {
  font: 600 13px/1.3 var(--mono);
  color: #e2f4f8;
  margin: 0 0 6px;
}
.graph-tooltip-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}
.graph-tooltip-desc {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cards Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 680px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1080px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 219, 240, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}
.blog-card:focus-visible {
  outline: 2px solid var(--cy);
  outline-offset: 2px;
}
.blog-card-thumb {
  position: relative;
  width: calc(100% + 48px);
  margin: -24px -24px 16px -24px;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  overflow: hidden;
  background: #060914;
  border-bottom: 1px solid var(--line);
}
.blog-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
}
.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font: 11px/1.2 var(--mono);
  color: var(--muted);
}
.blog-card-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-card-doc-id {
  font: 600 10px/1 var(--mono);
  color: #64748b;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.blog-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(45, 219, 240, 0.12);
  color: var(--cy);
  font-weight: 600;
  text-transform: uppercase;
}
.blog-card-title {
  margin: 0 0 10px;
  font: 600 18px/1.3 var(--mono);
  color: var(--ink);
}
.blog-card-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
  flex: 1 0 auto;
}
.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(22, 48, 60, 0.4);
  font: 12px/1.2 var(--mono);
  color: var(--cy);
}
.blog-card-read-link {
  color: var(--cy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.blog-card:hover .blog-card-read-link {
  color: var(--ink);
  transform: translateX(4px);
}

/* Single Post View */
.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font: 12px/1.2 var(--mono);
  color: var(--muted);
}
.article-title {
  margin: 0 0 16px;
  font: 700 32px/1.25 var(--mono);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font: 13px/1.3 var(--mono);
  color: var(--muted);
}

.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
}
.article-content h2 {
  margin: 40px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font: 600 22px/1.3 var(--mono);
  color: var(--ink);
}
.article-content h3 {
  margin: 28px 0 12px;
  font: 600 18px/1.35 var(--mono);
  color: var(--ink);
}
.article-content p {
  margin: 0 0 20px;
}
.article-content ul, .article-content ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.article-content li {
  margin-bottom: 8px;
}
.article-content blockquote {
  margin: 24px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--cy);
  background: rgba(45, 219, 240, 0.05);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--ink);
}
.article-content pre {
  margin: 24px 0;
  padding: 16px;
  background: #080c14;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font: 13px/1.55 var(--mono);
  color: #a8d5e5;
}
.article-content code {
  font-family: var(--mono);
  background: rgba(22, 48, 60, 0.45);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--cy);
}
.article-content pre code {
  background: transparent;
  padding: 0;
  font-size: 1em;
  color: inherit;
}

.article-callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid rgba(45, 219, 240, 0.3);
  background: rgba(10, 20, 32, 0.7);
}
.article-callout strong {
  color: var(--cy);
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
}

.article-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 13px/1.3 var(--mono);
}

/* Site footer */
.blog-footer {
  padding: 32px 20px;
  border-top: 1px solid var(--line);
  background: #04060a;
  text-align: center;
  font: 13px/1.4 var(--mono);
  color: var(--muted);
}
.blog-footer a { color: var(--muted); }
.blog-footer a:hover { color: var(--cy); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font: 14px/1.5 var(--mono);
}

/* Semicircular Dock Navigation: a true half-disc, icons sit on one arc around the left-edge hub */
@property --dock-sweep {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* 0 = half-disc on the left edge, 1 = full circle at the centre of the screen (Model & Voices open) */
@property --orbit {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

@property --dock-spin {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

.semicircle-dock {
  --dock-r: 128px;
  --dock-track: 92px;
  --dock-item: 40px;
  position: fixed;
  left: 0;
  top: 50%;
  width: var(--dock-r);
  height: calc(var(--dock-r) * 2);
  transform: translate(calc(var(--orbit) * 50vw), -50%);
  z-index: 85;
  pointer-events: none;
}

.semicircle-dock .dock-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(var(--dock-r) * var(--orbit) * -1);
  border-radius: calc(var(--dock-r) * var(--orbit)) var(--dock-r) var(--dock-r) calc(var(--dock-r) * var(--orbit));
  background:
    radial-gradient(circle at calc(var(--dock-r) * var(--orbit)) 50%, transparent calc(var(--dock-track) - 1px), rgba(45, 219, 240, 0.22) var(--dock-track), transparent calc(var(--dock-track) + 1.5px)),
    radial-gradient(circle at calc(var(--dock-r) * var(--orbit)) 50%, rgba(45, 219, 240, 0.2), rgba(45, 219, 240, 0.04) 55%, transparent 75%),
    linear-gradient(90deg, rgba(8, 14, 26, 0.94), rgba(4, 8, 14, 0.78));
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.55), 0 0 40px rgba(45, 219, 240, 0.08);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

/* A light sweeps around the rim of the half-disc */
.semicircle-dock .dock-container::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--dock-sweep) at calc(100% * var(--orbit) / (1 + var(--orbit))) 50%, rgba(45, 219, 240, 0.12), rgba(45, 219, 240, 0.9) 12%, rgba(45, 219, 240, 0.12) 28%, rgba(45, 219, 240, 0.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.dock-item {
  /* Half-disc angle blends into an evenly spaced ring that turns with --dock-spin */
  --a: calc(var(--a-half) * (1 - var(--orbit)) + (var(--a-circle) + var(--dock-spin)) * var(--orbit));
  position: absolute;
  left: calc(var(--dock-r) * var(--orbit) + cos(var(--a)) * var(--dock-track) - var(--dock-item) / 2);
  top: calc(50% + sin(var(--a)) * var(--dock-track) - var(--dock-item) / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--dock-item);
  height: var(--dock-item);
  border-radius: 50%;
  color: var(--ink, #d7f3fa);
  background: radial-gradient(circle at 30% 28%, rgba(45, 219, 240, 0.16), rgba(14, 22, 38, 0.78) 70%);
  border: 1px solid rgba(45, 219, 240, 0.22);
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.25s ease,
              background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

/* Seven stops, 25 degrees apart, centred on the horizontal axis */
.dock-item-home    { --a-half: -75deg; --a-circle: -90deg; --i: 0; }
.dock-item-blog    { --a-half: -50deg; --a-circle: -39deg; --i: 1; }
.dock-item-github  { --a-half: -25deg; --a-circle: 13deg;  --i: 2; }
.dock-item-status  { --a-half: 0deg;   --a-circle: 64deg;  --i: 3; }
.dock-item-privacy { --a-half: 25deg;  --a-circle: 116deg; --i: 4; }
.dock-item-terms   { --a-half: 50deg;  --a-circle: 167deg; --i: 5; }
.dock-item-contact { --a-half: 75deg;  --a-circle: 219deg; --i: 6; }

.dock-item:hover,
.dock-item:focus-visible {
  transform: translate(calc(cos(var(--a)) * 9px), calc(sin(var(--a)) * 9px)) scale(1.2);
  color: #2ddbf0;
  background: radial-gradient(circle at 30% 28%, rgba(45, 219, 240, 0.4), rgba(45, 219, 240, 0.12) 75%);
  border-color: rgba(45, 219, 240, 0.85);
  box-shadow: 0 0 18px rgba(45, 219, 240, 0.5), 0 0 4px rgba(45, 219, 240, 0.6) inset;
  outline: none;
  z-index: 2;
}

.dock-container:has(.dock-item:hover) .dock-item:not(:hover),
.dock-container:has(.dock-item:focus-visible) .dock-item:not(:focus-visible) {
  opacity: 0.6;
}

.dock-item.active {
  color: #2ddbf0;
  background: radial-gradient(circle at 30% 28%, rgba(45, 219, 240, 0.4), rgba(45, 219, 240, 0.14) 75%);
  border-color: rgba(45, 219, 240, 0.9);
  box-shadow: 0 0 14px rgba(45, 219, 240, 0.45);
}

.dock-item.active::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(45, 219, 240, 0.55);
  pointer-events: none;
}

.dock-icon {
  width: 18px;
  height: 18px;
  flex: none;
  transition: filter 0.2s ease, transform 0.28s ease;
}

.dock-item:hover .dock-icon,
.dock-item:focus-visible .dock-icon {
  filter: drop-shadow(0 0 6px #2ddbf0);
  transform: scale(1.06);
}

.dock-label {
  position: absolute;
  left: calc(100% + 14px);
  right: auto;
  top: 50%;
  transform: translateY(-50%) translateX(-8px) scale(0.92);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  background: rgba(6, 11, 22, 0.96);
  color: #e2f4f8;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 219, 240, 0.45);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(45, 219, 240, 0.25);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--sans, system-ui, -apple-system, sans-serif);
}

.dock-item:hover .dock-label,
.dock-item:focus-visible .dock-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

@keyframes dock-spin {
  to { --dock-spin: 360deg; }
}
@keyframes dock-sweep {
  to { --dock-sweep: 360deg; }
}
@keyframes dock-slide-in {
  from { opacity: 0; transform: translateY(-50%) translateX(-60px); }
}
@keyframes dock-item-in {
  from { opacity: 0; transform: translateX(-26px) scale(0.4); }
}
@keyframes dock-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes dock-sound-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 219, 240, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(45, 219, 240, 0); }
}

@media (max-width: 640px) {
  .semicircle-dock {
    transform: translate(calc(var(--orbit) * 50vw), -50%) scale(0.78);
    transform-origin: left center;
  }
}

/* Sound toggle at the hub of the half-disc */
.dock-sound {
  position: absolute;
  left: calc(8px * (1 - var(--orbit)) + (var(--dock-r) - 14px) * var(--orbit));
  top: calc(50% - 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(45, 219, 240, 0.3);
  background: rgba(8, 14, 26, 0.75);
  color: rgba(215, 243, 250, 0.75);
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dock-sound svg {
  width: 14px;
  height: 14px;
}

.dock-sound:hover,
.dock-sound:focus-visible {
  color: #2ddbf0;
  border-color: rgba(45, 219, 240, 0.8);
  box-shadow: 0 0 12px rgba(45, 219, 240, 0.4);
  outline: none;
}

.dock-sound .dock-sound-slash { display: none; }
.dock-sound.is-off { color: rgba(215, 243, 250, 0.4); }
.dock-sound.is-off .dock-sound-wave { display: none; }
.dock-sound.is-off .dock-sound-slash { display: inline; }
.dock-sound.is-playing { color: #2ddbf0; border-color: rgba(45, 219, 240, 0.7); }
.dock-sound.is-locked { border-style: dashed; }

/* Model & Voices open: the dock steps out to the middle as a full circle (toys.js sets .is-orbit) */
.semicircle-dock.is-orbit {
  --orbit: 1;
}

/* The settings menu sits above the dock while it is open, so none of it is covered */
.graph-controls:has(.talk-voice-settings[open]) {
  z-index: 88;
}

/* Motion only for visitors who have not asked for less of it */
@media (prefers-reduced-motion: no-preference) {
  .semicircle-dock {
    transition: --orbit 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .semicircle-dock.is-orbit .dock-container {
    animation: dock-spin 18s linear infinite;
  }
  .semicircle-dock {
    animation: dock-slide-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .semicircle-dock .dock-container::before {
    animation: dock-sweep 7s linear infinite;
  }
  .dock-item {
    animation: dock-item-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--i) * 80ms + 200ms);
  }
  .dock-item.active::after {
    animation: dock-ring 2.4s ease-out infinite;
  }
  .dock-sound.is-playing {
    animation: dock-sound-pulse 1.8s ease-in-out infinite;
  }
  .dock-sound.is-locked {
    animation: dock-sound-pulse 2.6s ease-in-out infinite;
  }
}

/* Legal & Status Slide-over Panels */
.legal-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s .25s;
}
.legal-panel:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.legal-panel[hidden] {
  display: none;
}

.legal-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, .65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.legal-panel:not([hidden]) .legal-panel-backdrop {
  opacity: 1;
}

.legal-panel-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: max(66.667vw, min(640px, 100vw));
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #080c14;
  border-left: 1px solid #16303c;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .5);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
  z-index: 121;
}
.legal-panel:not([hidden]) .legal-panel-container {
  transform: translateX(0);
}

.legal-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #16303c;
  background: #0a0f1a;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.legal-panel-tabs {
  display: inline-flex;
  gap: 6px;
  background: rgba(22, 48, 60, .4);
  padding: 3px;
  border-radius: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.legal-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.legal-panel-tab {
  padding: 6px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 13px/1.3 var(--mono);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.legal-panel-tab:hover {
  color: var(--ink);
}
.legal-panel-tab[aria-selected="true"] {
  background: rgba(45, 219, 240, .2);
  color: var(--cy);
  font-weight: 600;
}

.legal-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #16303c;
  border-radius: 6px;
  background: rgba(22, 48, 60, .25);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.legal-panel-close:hover,
.legal-panel-close:focus-visible {
  color: var(--ink);
  border-color: var(--cy);
  background: rgba(45, 219, 240, .15);
}

@media (max-width: 480px) {
  .legal-panel-header {
    padding: 12px;
    gap: 8px;
  }
  .legal-panel-tab {
    padding: 6px 8px;
    font-size: 12px;
  }
}

.legal-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 20px 40px;
  color: #b8d3dc;
  font: 14px/1.65 system-ui, -apple-system, sans-serif;
  -webkit-overflow-scrolling: touch;
}
.legal-panel-body:focus-visible {
  outline: none;
}

.legal-panel-content {
  width: 100%;
}
.legal-panel-content h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}
.legal-panel-content .legal-meta {
  margin: 0 0 20px;
  color: var(--muted);
  font: 12px/1.5 var(--mono);
}
.legal-panel-content h2 {
  margin: 28px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #16303c;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}
.legal-panel-content p,
.legal-panel-content ul {
  margin: 0 0 12px;
  width: 100%;
}
.legal-panel-content ul {
  padding-left: 20px;
}
.legal-panel-content li {
  margin-bottom: 6px;
}
.legal-panel-content a {
  color: var(--cy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-panel-content strong {
  color: var(--ink);
}
.legal-panel-content .legal-lang-content[hidden] {
  display: none;
}
.legal-panel-content .legal-brand,
.legal-panel-content .legal-header-nav {
  display: none;
}
.legal-panel-content .legal-foot {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #16303c;
  color: var(--muted);
  font: 12px/1.5 var(--mono);
}

.legal-panel-loading,
.legal-panel-error {
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font: 13px/1.5 var(--mono);
}

.legal-panel-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px;
  border-top: 1px solid #16303c;
  background: #0a0f1a;
  flex-shrink: 0;
}
.legal-panel-link {
  color: var(--muted);
  font: 12px/1.5 var(--mono);
  text-decoration: none;
  transition: color .15s ease;
}
.legal-panel-link:hover,
.legal-panel-link:focus-visible {
  color: var(--cy);
}

.status-panel-title {
  margin: 0;
  color: var(--ink);
  font: 600 14px/1.4 var(--mono);
}
.status-panel-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.status-page-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #05060c;
}

/* Card Category Badge & Meta Icons */
.blog-card-thumb {
  position: relative;
}
.blog-card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(6, 11, 24, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(45, 219, 240, 0.45);
  color: #2ddbf0;
  font: 600 11px/1.2 var(--mono);
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.03em;
  z-index: 2;
}

.blog-card-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.blog-card-meta .meta-icon {
  width: 13px;
  height: 13px;
  color: var(--cy);
  opacity: 0.85;
}

/* Card Tags */
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}
.blog-tag {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font: 11px/1.3 var(--mono);
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}
.blog-tag:hover {
  border-color: rgba(45, 219, 240, 0.7);
  background: rgba(45, 219, 240, 0.16);
  color: #2ddbf0;
  box-shadow: 0 0 10px rgba(45, 219, 240, 0.35);
  transform: translateY(-1px);
}
.blog-tag.active {
  background: rgba(45, 219, 240, 0.28);
  border-color: #2ddbf0;
  color: #2ddbf0;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(45, 219, 240, 0.45);
}
.blog-card:hover .blog-tag:not(:hover):not(.active) {
  border-color: rgba(45, 219, 240, 0.35);
  color: #cdebf5;
}

.blog-card-arrow {
  width: 16px;
  height: 16px;
  color: var(--cy);
  transition: transform 0.2s ease;
}
.blog-card:hover .blog-card-arrow {
  transform: translateX(4px);
}

/* Article Detail Tags Bar */
.article-tags-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 10px 14px;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-tags-bar .tag-icon {
  width: 16px;
  height: 16px;
  color: var(--cy);
  flex-shrink: 0;
}
.article-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(45, 219, 240, 0.08);
  border: 1px solid rgba(45, 219, 240, 0.25);
  border-radius: 14px;
  font: 12px/1.2 var(--mono);
  color: var(--cy);
  transition: all 0.15s ease;
}

.article-hero-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0 28px 0;
  border: 1px solid var(--line);
  background: #060914;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.article-hero-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article Text-to-Speech (TTS) Player Bar */
.article-tts-bar {
  background: linear-gradient(135deg, rgba(10, 18, 36, 0.95), rgba(6, 11, 24, 0.98));
  border: 1px solid rgba(45, 219, 240, 0.35);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(45, 219, 240, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tts-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 var(--mono);
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  outline: none;
}
.tts-btn-primary {
  background: linear-gradient(135deg, #2ddbf0, #00b4d8);
  color: #05060c;
  box-shadow: 0 2px 10px rgba(45, 219, 240, 0.3);
}
.tts-btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 0 16px rgba(45, 219, 240, 0.5);
  transform: translateY(-1px);
}
.tts-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.tts-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.tts-btn-stop {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 9px 12px;
}
.tts-btn-stop:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}
.tts-btn-stop:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tts-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.tts-voice-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(45, 219, 240, 0.25);
  border-radius: 8px;
  padding: 2px 8px 2px 10px;
  flex: 1 1 200px;
  min-width: 180px;
}
.tts-icon-voice {
  width: 15px;
  height: 15px;
  color: var(--cy);
  flex-shrink: 0;
}
.tts-voice-select {
  background: transparent;
  border: none;
  color: #e2f4f8;
  font: 12px/1.4 var(--sans);
  width: 100%;
  outline: none;
  cursor: pointer;
  padding: 6px 0;
}
.tts-voice-select option {
  background: #090e1c;
  color: #e2f4f8;
}

.tts-speed-btn {
  background: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(45, 219, 240, 0.25);
  color: var(--cy);
  font: 600 12px/1 var(--mono);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tts-speed-btn:hover {
  background: rgba(45, 219, 240, 0.15);
  border-color: var(--cy);
}

.tts-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(45, 219, 240, 0.12);
  font: 12px/1.3 var(--mono);
  color: #94a3b8;
}

/* Live audio equalizer bars */
.tts-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.tts-bar {
  width: 3px;
  height: 4px;
  background: var(--cy);
  border-radius: 1px;
  transition: height 0.15s ease;
}
.tts-equalizer.is-speaking .tts-bar:nth-child(1) {
  animation: tts-bounce 0.7s ease-in-out infinite alternate;
}
.tts-equalizer.is-speaking .tts-bar:nth-child(2) {
  animation: tts-bounce 0.5s ease-in-out infinite alternate 0.15s;
}
.tts-equalizer.is-speaking .tts-bar:nth-child(3) {
  animation: tts-bounce 0.8s ease-in-out infinite alternate 0.3s;
}
.tts-equalizer.is-speaking .tts-bar:nth-child(4) {
  animation: tts-bounce 0.6s ease-in-out infinite alternate 0.2s;
}

@keyframes tts-bounce {
  0% { height: 4px; opacity: 0.5; }
  100% { height: 14px; opacity: 1; }
}

@media (max-width: 580px) {
  .tts-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .tts-voice-picker {
    width: 100%;
  }
}

/* Blog discovery: one compact toolbar, topics available on demand. */
.blog-filters { gap: 8px; margin-bottom: 20px; position: relative; z-index: 90; }
.blog-filters .blog-view-toolbar {
  position: relative; flex-wrap: nowrap; gap: 8px; padding: 0; margin: 0;
  background: transparent; border: 0;
}
.blog-filters .blog-search-bar { flex: 1; max-width: 360px; min-width: 0; }
.blog-filters .blog-search-input { height: 36px; padding: 7px 34px 7px 32px; font-size: 12px; }
.blog-filters .blog-search-icon { width: 14px; height: 14px; left: 10px; }
.blog-filters .search-kbd-hint { right: 10px; font-size: 10px; }
.blog-filter-menu { position: static; flex: none; }
.blog-filter-toggle {
  display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--muted); font: 12px var(--mono); cursor: pointer; list-style: none;
}
.blog-filter-toggle::-webkit-details-marker { display: none; }
.blog-filter-toggle svg { width: 16px; height: 16px; }
.blog-filter-toggle .blog-filter-chevron { width: 12px; height: 12px; }
.blog-filter-menu[open] .blog-filter-chevron { transform: rotate(180deg); }
.blog-filter-menu[open] .blog-filter-toggle, .blog-filter-toggle:hover { color: var(--cy); border-color: var(--cy); }
.blog-filter-toggle:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; }
.blog-filter-count { background: var(--cy); color: var(--bg); border-radius: 4px; padding: 0 4px; font-size: 10px; }
.blog-filter-menu .blog-tags-bar {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  width: min(560px, 100%); max-height: 300px; overflow-y: auto;
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px #0009;
}
.blog-filter-menu .tag-pill { padding: 5px 9px; font-size: 11px; min-height: 28px; }
.blog-filters .blog-view-modes { margin-left: auto; padding: 2px; flex: none; }
.blog-filters .view-btn { padding: 6px; width: 30px; height: 30px; }
.blog-filters .view-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.blog-filters .blog-stats-counter { font-size: 11px; white-space: nowrap; }
.blog-filters .blog-active-filters { padding: 0; margin: 0; border: 0; background: none; gap: 8px; }
.blog-filters .active-filter-label { display: none; }
.blog-filters .active-tag-badge, .blog-filters .btn-reset-filters { font-size: 11px; }
@media (max-width: 600px) {
  .blog-filters .blog-view-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .blog-filters .blog-search-bar { max-width: none; width: 100%; }
  .blog-filters .blog-view-modes { margin-left: 0; justify-self: start; }
  .blog-filters .blog-stats-counter { justify-self: end; }
  .blog-filter-menu { position: static; }
  .blog-filter-menu .blog-tags-bar { top: 44px; left: 0; right: 0; width: auto; max-height: 280px; }
}
