/* Space AI — High-Volume Chronological Research Blog Controls & Day-Grouped Timeline */

.blog-controls-shell {
  margin-top: 2.4rem;
  margin-bottom: 1.5rem;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  background: rgba(14, 15, 20, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
html[data-theme="light"] .blog-controls-shell {
  background: #ffffff;
  border-color: rgba(9, 11, 18, 0.12);
  box-shadow: var(--shadow-sm);
}

.blog-ctrl-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.blog-search-input {
  flex: 1 1 230px;
  min-width: 0;
  padding: 0.56rem 0.85rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 8, 12, 0.92);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.86rem;
}
html[data-theme="light"] .blog-search-input {
  background: var(--bg-soft);
  border-color: rgba(9, 11, 18, 0.16);
}
.blog-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.blog-select {
  padding: 0.52rem 0.72rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 11, 16, 0.94);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  cursor: pointer;
}
html[data-theme="light"] .blog-select {
  background: var(--bg-soft);
  border-color: rgba(9, 11, 18, 0.16);
}

.blog-seg {
  display: inline-flex;
  gap: 0.18rem;
  padding: 0.2rem;
  border-radius: 8px;
  background: rgba(6, 7, 11, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
html[data-theme="light"] .blog-seg {
  background: var(--bg-soft);
  border-color: rgba(9, 11, 18, 0.14);
}
.blog-seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 600;
  padding: 0.36rem 0.62rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.blog-seg-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
}

.blog-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  align-items: center;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(20, 22, 30, 0.85);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}
html[data-theme="light"] .blog-pill {
  background: var(--bg-soft);
  border-color: rgba(9, 11, 18, 0.14);
}
.blog-pill:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--ink);
}
.blog-pill.active,
html[data-theme="light"] .blog-pill.active,
html[data-theme="light"] .blog-pill.active:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.blog-day-jumps {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 0.68rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}
html[data-theme="light"] .blog-day-jumps {
  border-top-color: rgba(9, 11, 18, 0.08);
}
.blog-day-jumps::-webkit-scrollbar { display: none; }

.blog-jump-lbl {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-right: 0.15rem;
}

.blog-day-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.22rem 0.56rem;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
html[data-theme="light"] .blog-day-chip {
  border-color: rgba(9, 11, 18, 0.14);
}
.blog-day-chip.active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.10);
}
html[data-theme="light"] .blog-day-chip.active {
  border-color: #0284c7;
  color: #0369a1;
  background: rgba(2, 132, 199, 0.09);
}

.blog-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin: 0 0 1.1rem 0;
}

/* Day Group Headers */
.blog-day-group {
  margin-bottom: 1.9rem;
}

.blog-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
html[data-theme="light"] .blog-day-header {
  background: rgba(9, 11, 18, 0.035);
  border-color: rgba(9, 11, 18, 0.10);
}

.blog-day-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.blog-day-date {
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.blog-day-badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}
html[data-theme="light"] .blog-day-badge {
  background: rgba(2, 132, 199, 0.11);
  color: #0369a1;
}
.blog-day-badge.today {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
html[data-theme="light"] .blog-day-badge.today {
  background: rgba(5, 150, 105, 0.13);
  color: #047857;
}

.blog-day-span {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--ink-muted);
}

.blog-day-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.67rem;
  padding: 0.24rem 0.56rem;
  border-radius: 7px;
  cursor: pointer;
}
html[data-theme="light"] .blog-day-toggle {
  border-color: rgba(9, 11, 18, 0.15);
}
.blog-day-toggle:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Badges inside Cards */
.blog-time-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-left: auto;
}
.blog-origin-badge {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  padding: 0.14rem 0.46rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-origin-badge.auto {
  background: rgba(167, 139, 250, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.32);
}
html[data-theme="light"] .blog-origin-badge.auto {
  background: rgba(124, 58, 237, 0.10);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.24);
}
.blog-metric-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.69rem;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.24);
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}
html[data-theme="light"] .blog-metric-chip {
  color: #047857;
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.22);
}

.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.blog-paper-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}
html[data-theme="light"] .blog-paper-link { color: #0369a1; }

/* Compact High-Volume Index Rows (50+ posts/day ready) */
.blog-compact-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(12, 13, 18, 0.85);
}
html[data-theme="light"] .blog-compact-list {
  background: #ffffff;
  border-color: rgba(9, 11, 18, 0.11);
}

.blog-compact-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.14s ease;
}
html[data-theme="light"] .blog-compact-row {
  border-bottom-color: rgba(9, 11, 18, 0.07);
}
.blog-compact-row:last-child { border-bottom: none; }
.blog-compact-row:hover { background: rgba(255, 255, 255, 0.05); }
html[data-theme="light"] .blog-compact-row:hover { background: rgba(9, 11, 18, 0.03); }

.blog-compact-time {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}
.blog-compact-seq {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brass);
}
.blog-compact-main {
  min-width: 0;
}
.blog-compact-title {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-compact-sub {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--ink-muted);
  margin-top: 0.16rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.blog-compact-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.blog-expand-day-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.62rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
}
html[data-theme="light"] .blog-expand-day-btn {
  border-color: rgba(9, 11, 18, 0.22);
  background: rgba(9, 11, 18, 0.02);
}
.blog-expand-day-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.blog-more-wrap {
  margin-top: 1.6rem;
  text-align: center;
}

@media (max-width: 640px) {
  .blog-compact-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.4rem 0.65rem;
  }
  .blog-compact-seq, .blog-compact-right { display: none; }
}
