/* Hub pages: category hubs, section landings, tag hubs, author pages and the
   blog index (generated by _build/gen_hubs.py). Rendered inside the article
   template (#content, col-sm-7), so everything here is scoped to the card
   grid and the small chrome around it. Colours come from the brand tokens
   (--brand-*) and the design-system tokens (--c-*) that css/main.css defines
   for light and dark; no new fonts. */

.hub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 18px; font-size: 13px; color: var(--c-text-mute, var(--brand-muted)); }
.hub-meta > span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 10px 3px 0; opacity: .7; }

.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.hub-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--c-rule, var(--brand-line)); border-radius: 999px; background: var(--brand-surface); color: var(--brand-primary-deep); font-size: 13px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: border-color .12s, background .12s; }
.hub-chip b { font-weight: 600; font-size: 11.5px; color: var(--c-text-mute, var(--brand-muted)); }
.hub-chip:hover { border-color: var(--brand-primary); background: #fff; color: var(--brand-primary); text-decoration: none; }
html.dark .hub-chip { background: var(--c-surface-alt); color: var(--c-accent-bright); }
html.dark .hub-chip:hover { background: var(--c-surface); }

.hub-jump { display: flex; gap: 6px; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 8px; margin: 0 0 8px; border-bottom: 1px solid var(--c-rule-soft, var(--brand-line)); scrollbar-width: thin; }
.hub-jump-label { flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-mute, var(--brand-muted)); margin-right: 4px; }
.hub-jump a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--c-text-soft, var(--brand-body)); text-decoration: none; white-space: nowrap; }
.hub-jump a b { font-weight: 500; font-size: 11px; color: var(--c-text-mute, var(--brand-muted)); }
.hub-jump a:hover { background: var(--c-surface-alt, var(--brand-surface)); color: var(--brand-primary); text-decoration: none; }

.hub-group { margin: 0 0 28px; scroll-margin-top: 72px; }
.hub-group > h2 { display: flex; align-items: baseline; gap: 10px; font-size: 20px; margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--c-rule-soft, var(--brand-line)); }
.hub-group > h2 a { color: inherit; text-decoration: none; }
.hub-group > h2 a:hover { color: var(--brand-primary); }
.hub-count { font-size: 12.5px; font-weight: 500; color: var(--c-text-mute, var(--brand-muted)); }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 12px; border: 1px solid var(--c-rule, var(--brand-line)); border-radius: 10px; background: var(--c-surface, #fff); transition: border-color .12s, box-shadow .12s, transform .12s; }
.hub-card:hover { border-color: var(--brand-primary); box-shadow: 0 4px 16px rgba(87, 85, 217, .10); transform: translateY(-1px); }
.hub-card.is-runnable { border-left: 3px solid var(--brand-success); }
.hub-card-cat { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-primary); text-decoration: none; }
.hub-card-cat:hover { text-decoration: underline; }
.hub-card-title { font-size: 15.5px; line-height: 1.35; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.hub-card-title a { color: var(--c-text, var(--brand-ink)); text-decoration: none; }
.hub-card-title a::after { content: ""; position: absolute; inset: 0; }
.hub-card:hover .hub-card-title a { color: var(--brand-primary); }
.hub-card-desc { margin: 0; font-size: 13px; line-height: 1.45; color: var(--c-text-soft, var(--brand-body)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--c-text-mute, var(--brand-muted)); }
.hub-card-meta time { font-variant-numeric: tabular-nums; }
.hub-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; margin: 0 8px 2px; opacity: .7; }
.hub-run { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-success); background: rgba(31, 122, 85, .10); }
.hub-run::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent currentColor; }
html.dark .hub-run { color: #6ee7b7; background: rgba(110, 231, 183, .12); }
.hub-card-cat, .hub-card-cat:hover { position: relative; z-index: 1; }

.hub-empty { color: var(--c-text-mute, var(--brand-muted)); font-style: italic; }

.hub-author { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 8px; }
.hub-author > div { min-width: 0; flex: 1; }
.hub-avatar { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--c-rule, var(--brand-line)); background: var(--c-surface-alt, var(--brand-surface)); margin-top: 6px; }
.hub-author h1 { margin-top: 0; }

.hub-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--c-rule-soft, var(--brand-line)); font-size: 14px; }
.hub-pager a { font-weight: 600; color: var(--brand-primary); text-decoration: none; padding: 6px 12px; border: 1px solid var(--c-rule, var(--brand-line)); border-radius: 8px; }
.hub-pager a:hover { border-color: var(--brand-primary); background: var(--brand-surface); text-decoration: none; }
html.dark .hub-pager a:hover { background: var(--c-surface-alt); }
.hub-pager .is-off { color: var(--c-text-mute, var(--brand-muted)); padding: 6px 12px; opacity: .6; }
.hub-pager-pos { color: var(--c-text-mute, var(--brand-muted)); font-variant-numeric: tabular-nums; }
.hub-pager-prev::before { content: "\2190\00a0"; }
.hub-pager-next::after { content: "\00a0\2192"; }

@media (max-width: 480px) {
  .hub-grid { grid-template-columns: 1fr; gap: 10px; }
  .hub-card { padding: 12px 14px 10px; }
  .hub-author { flex-direction: column; gap: 10px; }
  .hub-avatar { width: 64px; height: 64px; }
  .hub-group > h2 { font-size: 18px; }
}
