/* Ayra ix — AI Hub · EDITORIAL-DEPTH · Glass editorial design system, unified with site aurora/starfield */

/* ── 1. Tokens ── */
@keyframes hubAuroraShift {
  0%, 100% { transform: translateX(-3%) rotate(-2deg) scaleY(1); opacity: 0.65; }
  50% { transform: translateX(3%) rotate(2deg) scaleY(1.06); opacity: 0.85; }
}

@keyframes hubSignalPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes hubPulseRing {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.15); opacity: 0.12; }
}

@keyframes hubSparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(90deg); }
}

@keyframes hubShimmerSweep {
  0% { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}

@keyframes hubBorderGlow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

html:has(body.ai-hub-page) { background: var(--bg-deep, #02040c); }

body.ai-hub-page {
  --hub-bg: var(--bg, #040814);
  --hub-bg-deep: var(--bg-deep, #02040c);
  --hub-surface: rgba(10, 14, 26, 0.72);
  --hub-surface-solid: #0a0e1a;
  --hub-surface-card: rgba(12, 18, 32, 0.48);
  --hub-surface-hover: rgba(18, 24, 42, 0.62);
  --hub-glass-bg: rgba(12, 18, 32, 0.42);
  --hub-glass-border: rgba(255, 255, 255, 0.08);
  --hub-glass-hover: rgba(14, 22, 38, 0.55);
  --hub-glass-blur: 16px;
  --hub-text: #eaf6ff;
  --hub-text-body: #b9c8d6;
  --hub-text-muted: #6c7b94;
  --hub-accent: var(--accent, #fb7185);
  --hub-accent-2: var(--accent2, #34d399);
  --hub-accent-3: var(--accent3, #fda4af);
  --hub-accent-warm: var(--accent, #fb7185);
  --hub-border: color-mix(in srgb, var(--accent2) 18%, transparent);
  --hub-border-strong: color-mix(in srgb, var(--accent2) 30%, transparent);
  --hub-glow: color-mix(in srgb, var(--accent) 22%, transparent);
  --hub-row-h: 56px;
  --hub-sidebar-w: 260px;
  --hub-sidebar-w-collapsed: 76px;
  --hub-bottom-nav-h: 64px;
  --hub-rail-w: 300px;
  --hub-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --hub-focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --text: var(--hub-text);
  --text2: var(--hub-text-body);
  --muted: var(--hub-text-muted);
  --border: var(--hub-border);
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: var(--font-body);
  line-height: 1.65;
}

body.ai-hub-page::before { display: none; }

/* Section accents stay on shared.css — keep hub glow in sync */
body.ai-hub-page[data-hub-section="updates"] { --hub-glow: color-mix(in srgb, var(--accent) 24%, transparent); }
body.ai-hub-page[data-hub-section="repos"] { --hub-glow: color-mix(in srgb, var(--accent) 24%, transparent); }
body.ai-hub-page[data-hub-section="links"],
body.ai-hub-page[data-hub-section="guides"] { --hub-glow: color-mix(in srgb, var(--accent) 24%, transparent); }
body.ai-hub-page[data-hub-section="reports"],
body.ai-hub-page[data-hub-section="glossary"] { --hub-glow: color-mix(in srgb, var(--accent) 24%, transparent); }
body.ai-hub-page[data-hub-section="pulse"] { --hub-glow: color-mix(in srgb, var(--accent) 24%, transparent); }

/* ── 2. Cinematic background — shares the site's real aurora/starfield/orb system ── */
.hub-aurora-sky {
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, var(--aurora-top), transparent 55%),
    radial-gradient(ellipse 70% 45% at 88% 30%, var(--aurora-side), transparent 50%),
    radial-gradient(ellipse 60% 45% at 8% 65%, var(--aurora-warm), transparent 52%),
    linear-gradient(180deg, var(--aurora-sky-base) 0%, var(--bg) 45%, var(--bg-deep) 100%);
}

.hub-starfield { opacity: 0.55; }

.hub-sparkle-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.hub-sparkle {
  position: absolute; width: 6px; height: 6px;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 70%);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  animation: hubSparkleTwinkle 5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.7));
}
.hub-sparkle:nth-child(1) { top: 16%; left: 14%; animation-delay: 0s; filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.7)); }
.hub-sparkle:nth-child(2) { top: 30%; left: 82%; animation-delay: -1.2s; filter: drop-shadow(0 0 6px rgba(176, 38, 255, 0.7)); }
.hub-sparkle:nth-child(3) { top: 62%; left: 22%; animation-delay: -2.6s; filter: drop-shadow(0 0 6px rgba(176, 38, 255, 0.7)); }
.hub-sparkle:nth-child(4) { top: 78%; left: 68%; animation-delay: -3.4s; filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.7)); }
.hub-sparkle:nth-child(5) { top: 46%; left: 50%; animation-delay: -0.6s; filter: drop-shadow(0 0 6px rgba(176, 38, 255, 0.7)); }

.hub-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hub-ambient .orb { opacity: 0.4; }
.hub-ambient .orb1 { width: 620px; height: 620px; top: -220px; left: -160px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.hub-ambient .orb2 { width: 560px; height: 560px; bottom: -200px; right: -160px; background: color-mix(in srgb, var(--accent2) 7%, transparent); animation-delay: -9s; }
.hub-ambient .orb3 { width: 420px; height: 420px; top: 42%; left: 55%; background: color-mix(in srgb, var(--accent3) 10%, transparent); animation-delay: -5s; animation-duration: 26s; }

@media (prefers-reduced-motion: reduce) {
  .hub-sparkle { animation: none; opacity: 0.5; }
}

/* ── 3. Nav + shell (fixed nav z-index 220) ── */
body.ai-hub-page header { position: relative; z-index: 220; }

body.ai-hub-page .site-nav {
  position: fixed; inset: 0 0 auto; z-index: 220;
  height: var(--nav-h);
  background: rgba(10, 14, 26, 0.94);
  border-bottom: 1px solid var(--hub-border);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

body.ai-hub-page .site-nav a { color: var(--hub-text-body); }
body.ai-hub-page .site-nav a:hover,
body.ai-hub-page .site-nav a[aria-current="page"] { color: var(--hub-accent); }
body.ai-hub-page .nav-logo { color: var(--hub-text); }

.hub-search-trigger { display: none !important; }

.hub-shell {
  position: relative; z-index: 2;
  display: flex; width: 100%;
  min-height: calc(100dvh - var(--nav-h));
  padding-top: var(--nav-h);
  background: transparent;
}
@media (min-width: 1024px) {
  /* Content is dense enough that a full-viewport-height shell just leaves dead
     space above the footer on tall screens — let height follow content instead. */
  .hub-shell { min-height: 0; }
}

.hub-main { flex: 1; min-width: 0; width: 100%; }

.hub-main-inner {
  width: 100%; max-width: none;
  padding: var(--space-5) var(--space-4) calc(var(--space-10) + var(--hub-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .hub-main-inner { padding: var(--space-6) var(--space-6) var(--space-10); }
}
@media (min-width: 1024px) {
  .hub-main-inner { padding: var(--space-6) var(--space-8) var(--space-10); }
}

.hub-dashboard {
  display: grid; grid-template-columns: 1fr; gap: var(--space-6); width: 100%;
}

@media (min-width: 1200px) {
  .hub-dashboard {
    grid-template-columns: minmax(0, 1fr) var(--hub-rail-w);
    gap: var(--space-6); align-items: start;
  }
  .hub-rail-sticky { position: sticky; top: calc(var(--nav-h) + var(--space-4)); }
}

.hub-dashboard-main, .hub-dashboard-rail { min-width: 0; }
.hub-rail-sticky { display: flex; flex-direction: column; gap: var(--space-6); }
.hub-rail-block { margin-bottom: 0; }

.hub-rail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-3);
}

.hub-rail-head h2 {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); font-size: var(--text-sm);
  font-weight: 600; color: var(--hub-text); margin: 0;
}

.hub-rail-head a {
  font-size: var(--text-xs); color: var(--hub-accent); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}

/* ── 4. Sidebar ── */
.hub-sidebar-toggle {
  display: none; position: fixed;
  bottom: calc(var(--hub-bottom-nav-h) + var(--space-3)); left: var(--space-4);
  z-index: 50; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface); color: var(--hub-text); cursor: pointer;
}

.hub-sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 44;
  background: rgba(6, 9, 18, 0.72);
}
.hub-sidebar-backdrop.is-open { display: block; }

.hub-sidebar {
  flex: 0 0 var(--hub-sidebar-w); width: var(--hub-sidebar-w);
  display: flex; flex-direction: column;
  background: rgba(8, 12, 24, 0.78);
  border-right: 1px solid var(--hub-glass-border);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  color: var(--hub-text-body);
  transition: width 0.25s var(--hub-ease), opacity 0.25s var(--hub-ease);
  overflow: hidden;
}

.hub-sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); padding: var(--space-4);
  border-bottom: 1px solid var(--hub-border);
}

.hub-brand {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none; color: var(--hub-text); min-height: 44px;
}

.hub-brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.hub-brand-name { display: block; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; line-height: 1.2; }
.hub-brand-sub { display: block; font-size: var(--text-xs); color: var(--hub-accent); letter-spacing: 0.08em; text-transform: uppercase; }

.hub-sidebar-collapse {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hub-border); border-radius: var(--radius-sm);
  background: transparent; color: var(--hub-text-muted); cursor: pointer;
}

.hub-sidebar-nav { position: relative; flex: 1; overflow-y: auto; padding: var(--space-3); }

.hub-nav-indicator {
  position: absolute; left: var(--space-3); right: var(--space-3);
  height: var(--indicator-height, 44px); top: var(--indicator-top, 0);
  border-radius: var(--radius-sm);
  background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.2);
  opacity: 0; pointer-events: none;
  transition: top 0.2s var(--hub-ease), height 0.2s var(--hub-ease), opacity 0.2s;
  z-index: 0;
}
.hub-nav-indicator.is-visible { opacity: 1; }
.hub-nav-indicator.is-instant { transition: none; }

.hub-nav-group { margin-bottom: var(--space-4); }
.hub-nav-group-label {
  display: block; padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hub-text-muted);
}
.hub-nav-group-items { display: flex; flex-direction: column; gap: 2px; }

.hub-nav-link {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 44px; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); color: var(--hub-text-body);
  text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  transition: color 0.15s;
}
.hub-nav-link:hover, .hub-nav-link[aria-current="page"] { color: var(--hub-text); }
.hub-nav-link[aria-current="page"] .hub-icon { color: var(--hub-accent); }
.hub-nav-icon-wrap { width: 24px; display: inline-flex; justify-content: center; flex-shrink: 0; }

.hub-nav-badge {
  margin-left: auto; font-size: var(--text-xs); padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(251, 113, 133, 0.12); color: var(--hub-accent);
  border: 1px solid rgba(251, 113, 133, 0.25);
}

.hub-sidebar-footer { padding: var(--space-3); border-top: 1px solid var(--hub-border); }
.hub-sidebar-exit {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 44px; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); color: var(--hub-text-muted);
  text-decoration: none; font-size: var(--text-sm);
}
.hub-sidebar-exit:hover { color: var(--hub-accent); }
.hub-exit-arrow { width: 16px; height: 16px; margin-left: auto; }

.hub-sidebar[data-collapsed="true"] {
  width: var(--hub-sidebar-w-collapsed); flex-basis: var(--hub-sidebar-w-collapsed);
}
.hub-sidebar[data-collapsed="true"] .hub-brand-text,
.hub-sidebar[data-collapsed="true"] .hub-nav-label,
.hub-sidebar[data-collapsed="true"] .hub-nav-group-label,
.hub-sidebar[data-collapsed="true"] .hub-nav-badge,
.hub-sidebar[data-collapsed="true"] .hub-exit-arrow { display: none; }
.hub-sidebar[data-collapsed="true"] .hub-nav-link { justify-content: center; padding-inline: var(--space-2); }

body.hub-reading-mode .hub-sidebar { opacity: 0.48; }
body.hub-reading-mode .hub-sidebar:hover { opacity: 1; }

@media (max-width: 1023px) {
  .hub-sidebar {
    position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 45;
    transform: translateX(-100%); transition: transform 0.25s var(--hub-ease);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  }
  .hub-sidebar.is-open { transform: translateX(0); }
  /* Bottom nav covers primary sections; hide floating grid FAB that overlapped Home */
  .hub-sidebar-toggle { display: none !important; }
  .hub-sidebar-collapse { display: none; }
}

/* ── 5. Bottom nav + overlays ── */
.hub-bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 42;
  height: calc(var(--hub-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--hub-surface-solid);
  border-top: 1px solid var(--hub-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}
.hub-bottom-nav-inner { display: flex; height: var(--hub-bottom-nav-h); }
.hub-bottom-link { flex: 1; display: flex; align-items: center; justify-content: center; }

/* Tabs are <a class="hub-bottom-link"> or <span><button> — style both */
a.hub-bottom-link,
.hub-bottom-link a,
.hub-bottom-link button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; width: 100%; min-width: 44px; min-height: 44px;
  padding: var(--space-1) var(--space-2); border: none; background: none;
  color: var(--hub-text-muted); font-size: 10px; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
a.hub-bottom-link[aria-current="page"],
a.hub-bottom-link:hover,
.hub-bottom-link a[aria-current="page"],
.hub-bottom-link a:hover,
.hub-bottom-link button:hover {
  color: var(--hub-accent);
}
.hub-bottom-link .hub-icon { width: 22px; height: 22px; color: inherit; fill: currentColor; }
@media (max-width: 1023px) { .hub-bottom-nav { display: block; } }

.hub-more-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end;
  background: rgba(6, 9, 18, 0.65);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.hub-more-sheet.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.hub-more-panel {
  width: 100%;
  padding: var(--space-6) var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0));
  background: var(--hub-surface-card); border-top: 1px solid var(--hub-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: translateY(100%); transition: transform 0.25s var(--hub-ease);
}
.hub-more-sheet.is-open .hub-more-panel { transform: translateY(0); }
.hub-more-panel h2, .hub-more-panel h3 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-4); color: var(--hub-text); }
.hub-more-panel a {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 48px; padding: var(--space-2) 0;
  color: var(--hub-text-body); text-decoration: none; border-bottom: 1px solid var(--hub-border);
}
.hub-more-panel a:hover { color: var(--hub-accent); }

.hub-search-overlay {
  position: fixed; inset: 0; z-index: 230;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--nav-h) + var(--space-8)) var(--space-4) var(--space-8);
  background: rgba(10, 14, 26, 0.88);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.hub-search-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.hub-search-dialog {
  width: min(640px, 100%); padding: var(--space-6);
  background: var(--hub-surface-card); border: 1px solid var(--hub-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 40px var(--hub-glow);
}

.hub-search-dialog input, .hub-search-hero input {
  width: 100%; min-height: 48px; padding: 0 var(--space-4);
  border: 1px solid var(--hub-border-strong); border-radius: var(--radius-md);
  background: var(--hub-surface); color: var(--hub-text); font-size: var(--text-base);
}
.hub-search-dialog input:focus, .hub-search-hero input:focus {
  outline: none; border-color: var(--hub-accent); box-shadow: var(--hub-focus-ring);
}
.hub-search-dialog input::placeholder, .hub-search-hero input::placeholder { color: #64748b; }
.hub-search-hint { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--hub-text-muted); }

/* ── 6. Hero + sections ── */
.hub-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--hub-text-muted);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hub-nav-link:hover .hub-icon { color: var(--hub-text-body); }

.hub-hero {
  position: relative; margin-bottom: var(--space-5); padding: var(--space-4) 0;
}

.hub-hero::before {
  content: ''; position: absolute; inset: -20% -10% auto; height: 120%;
  background: radial-gradient(ellipse 80% 60% at 25% 15%, rgba(176, 38, 255, 0.14), transparent 55%),
              radial-gradient(ellipse 60% 50% at 80% 40%, rgba(251, 113, 133, 0.1), transparent 50%),
              radial-gradient(ellipse 50% 45% at 55% 80%, rgba(176, 38, 255, 0.08), transparent 52%);
  pointer-events: none; z-index: -1;
  animation: hubAuroraShift 18s ease-in-out infinite alternate;
}

.hub-hero .hero-badge {
  position: relative; display: inline-block; margin-bottom: var(--space-4); padding: 6px 14px;
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.12em; color: var(--hub-accent);
  border: 1px solid rgba(251, 113, 133, 0.4); border-radius: var(--radius-full);
  background: rgba(251, 113, 133, 0.06);
  box-shadow: 0 0 20px rgba(251, 113, 133, 0.08);
  overflow: hidden;
}
.hub-hero .hero-badge::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: hubShimmerSweep 3.5s ease-in-out infinite;
}

.hub-hero .hero-title {
  font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700;
  line-height: 1.12; margin-bottom: var(--space-4);
  background: linear-gradient(100deg, #f5f4fb 0%, #f5f4fb 30%, #fb7185 58%, #34d399 78%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.hub-hero .hero-sub { max-width: 62ch; color: var(--hub-text-body); margin-bottom: var(--space-6); }

.hub-search-hero { position: relative; max-width: 100%; margin-bottom: var(--space-4); }
.hub-search-hero .hub-search-icon {
  position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%);
  color: var(--hub-text-muted); pointer-events: none;
}
.hub-search-hero input { padding-left: calc(var(--space-4) + 28px); }

.hub-popular { font-size: var(--text-sm); color: var(--hub-text-muted); }
.hub-popular a {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 2px 10px; margin: 2px 0; border-radius: var(--radius-full);
  border: 1px solid rgba(251, 113, 133, 0.2); background: rgba(251, 113, 133, 0.06);
  color: var(--hub-accent); text-decoration: none;
}
.hub-popular a:hover { border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.1); }

.hub-landing-section { margin-bottom: var(--space-6); }

.hub-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.hub-section-head h2 {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600;
  background: linear-gradient(100deg, #f5f4fb 0%, #fb7185 60%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hub-section-head a {
  font-size: var(--text-sm); color: var(--hub-accent); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.hub-section-num { color: var(--hub-text-muted); font-weight: 500; margin-right: var(--space-2); -webkit-text-fill-color: var(--hub-text-muted); }
.hub-section-label {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hub-text-muted); margin-bottom: var(--space-2);
}

/* Holographic divider — echoes the site's tri-color section-divider under every hub section head */
.hub-section-head { position: relative; padding-bottom: var(--space-4); }
.hub-section-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.4), rgba(176, 38, 255, 0.4), rgba(176, 38, 255, 0.3), transparent);
}

/* ── 7. Brief feed ── */
.hub-brief-signal {
  margin-bottom: var(--space-4); padding: var(--space-2) var(--space-4);
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface); overflow: hidden;
}

.hub-brief-signal-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--hub-text-body);
}

.hub-signal-pulse {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--hub-accent);
  box-shadow: 0 0 8px var(--hub-accent);
  animation: hubSignalPulse 2s ease-in-out infinite;
}

.hub-marquee-link { color: var(--hub-text-body); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.hub-marquee-link:hover { color: var(--hub-accent); }
.hub-marquee-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--hub-accent); opacity: 0.5; flex-shrink: 0; }
.hub-marquee-sep { color: var(--hub-text-muted); margin: 0 4px; }
.hub-marquee-group { display: inline-flex; align-items: center; gap: 4px; }

.hub-brief-mosaic {
  display: grid; grid-template-columns: 1fr; gap: var(--space-2); margin-bottom: var(--space-2);
}
@media (min-width: 768px) { .hub-brief-mosaic { grid-template-columns: repeat(3, 1fr); } }

.hub-brief-card {
  position: relative; display: block; text-decoration: none; color: inherit;
  border-radius: var(--radius-md); min-height: var(--hub-row-h);
  transition: transform 0.25s var(--hub-ease);
  padding: 1px;
}
.hub-brief-card:hover { transform: translateY(-3px); }

.hub-brief-card__mesh, .hub-brief-card__noise { display: none; }

.hub-brief-card__border {
  position: absolute; inset: 0; border-radius: inherit;
  background: conic-gradient(from 0deg, rgba(251, 113, 133, 0.55), rgba(176, 38, 255, 0.55), rgba(176, 38, 255, 0.45), rgba(251, 113, 133, 0.55));
  opacity: 0.5;
  transition: opacity 0.3s var(--hub-ease);
}
.hub-brief-card:hover .hub-brief-card__border,
.hub-brief-card:focus-visible .hub-brief-card__border { opacity: 1; }

.hub-brief-card__shimmer {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  pointer-events: none; z-index: 2;
}
.hub-brief-card__shimmer::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-160%);
  transition: transform 0.6s var(--hub-ease);
}
.hub-brief-card:hover .hub-brief-card__shimmer::after { transform: translateX(360%); }

.hub-brief-card__inner {
  position: relative; z-index: 1;
  height: 100%; padding: var(--space-3) var(--space-4);
  border-radius: calc(var(--radius-md) - 1px);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, box-shadow 0.25s var(--hub-ease);
}
.hub-brief-card:hover .hub-brief-card__inner,
.hub-brief-card:focus-visible .hub-brief-card__inner {
  background: var(--hub-glass-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 24px var(--hub-glow);
}

.hub-brief-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.hub-brief-chip { font-size: var(--text-xs); font-weight: 600; color: var(--hub-accent); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-brief-trend { margin-left: 4px; color: var(--hub-text-muted); }
.hub-brief-live { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hub-accent); }
.hub-brief-meta { font-size: var(--text-xs); color: var(--hub-text-muted); }
.hub-brief-head-meta { display: flex; align-items: center; gap: var(--space-2); }

.hub-brief-card h3 {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  color: var(--hub-text); line-height: 1.35; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hub-brief-card p {
  font-size: var(--text-xs); color: var(--hub-text-body); margin-bottom: var(--space-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hub-brief-footer { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-xs); color: var(--hub-text-muted); }
.hub-brief-cta { margin-left: auto; color: var(--hub-accent); }

.hub-brief-dense-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  overflow: hidden; background: var(--hub-surface);
}
.hub-brief-dense-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto auto;
  align-items: center; gap: var(--space-3); min-height: var(--hub-row-h);
  padding: 0 var(--space-4); text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--hub-border); transition: background 0.15s;
}
.hub-brief-dense-row:last-child { border-bottom: none; }
.hub-brief-dense-row:hover, .hub-brief-dense-row:focus-visible { background: var(--hub-surface-card); }
.hub-brief-dense-title { font-size: var(--text-sm); font-weight: 500; color: var(--hub-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-brief-impact, .hub-brief-sources { font-size: var(--text-xs); color: var(--hub-text-muted); white-space: nowrap; }
.hub-brief-dense-arrow { color: var(--hub-accent); }

@media (max-width: 767px) {
  .hub-brief-dense-row { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; padding: var(--space-3) var(--space-4); min-height: auto; }
  .hub-brief-dense-title { grid-column: 1 / -1; white-space: normal; }
  .hub-brief-impact, .hub-brief-sources, .hub-brief-meta { display: none; }
}

/* ── 8. Explore the hub — lean card grid (dense row, not a tall tile) ── */
.hub-nav-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2);
}
@media (max-width: 480px) {
  .hub-nav-list { grid-template-columns: 1fr; }
}

.hub-nav-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 60px; padding: var(--space-3) var(--space-4);
  text-decoration: none; color: inherit;
  border: 1px solid var(--hub-glass-border); border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.15s var(--hub-ease), border-color 0.2s, box-shadow 0.25s var(--hub-ease), background 0.2s;
}
.hub-nav-row:hover, .hub-nav-row:focus-visible {
  transform: translateX(2px); border-color: color-mix(in srgb, var(--section-accent, var(--hub-accent)) 30%, transparent);
  background: var(--hub-glass-hover);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 16px color-mix(in srgb, var(--section-accent, var(--hub-accent)) 18%, transparent);
}

/* Comet trail — a soft light streak sweeps through the card on hover */
.hub-nav-row::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--section-accent, var(--hub-accent)) 16%, transparent), transparent);
  transform: translateX(0); opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.hub-nav-row:hover::before, .hub-nav-row:focus-visible::before {
  opacity: 1; animation: hubCometSweep 0.7s var(--hub-ease);
}
@keyframes hubCometSweep {
  from { transform: translateX(0); }
  to { transform: translateX(430%); }
}

/* Left accent bar */
.hub-nav-row-accent {
  align-self: stretch; width: 2px; flex-shrink: 0; margin: -2px 0;
  background: var(--section-accent, var(--hub-accent));
  box-shadow: 0 0 8px var(--section-accent, var(--hub-accent));
  animation: hubBorderGlow 3s ease-in-out infinite;
}
.hub-nav-row--updates { --section-accent: #fb7185; }
.hub-nav-row--reports { --section-accent: #34d399; }
.hub-nav-row--guides { --section-accent: #34d399; }
.hub-nav-row--repos { --section-accent: #fb7185; }
.hub-nav-row--links { --section-accent: #34d399; }
.hub-nav-row--pulse { --section-accent: #fb7185; }
.hub-nav-row--glossary { --section-accent: #34d399; }

/* .hub-nav-row-top is unwrapped via display:contents, so icon/arrow join the
   row's flex layout directly — explicit `order` restores the intended sequence
   (icon, text, meta, arrow) since the arrow sits before text/meta in the DOM. */
.hub-nav-row-top { display: contents; }
.hub-nav-row-icon {
  order: 1;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: color-mix(in srgb, var(--section-accent, var(--hub-accent)) 12%, transparent);
  color: var(--section-accent, var(--hub-accent));
  transition: transform 0.25s var(--hub-ease);
}
.hub-nav-row-icon svg { width: 16px; height: 16px; }
.hub-nav-row:hover .hub-nav-row-icon { transform: scale(1.08) rotate(-4deg); }
.hub-nav-row-arrow {
  order: 4;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  color: var(--section-accent, var(--hub-accent));
  font-size: var(--text-sm); transition: transform 0.2s var(--hub-ease);
}
.hub-nav-row:hover .hub-nav-row-arrow { transform: translateX(2px); }

.hub-nav-row-text { order: 2; display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.hub-nav-row-title { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; color: var(--hub-text); line-height: 1.2; }
.hub-nav-row-desc {
  font-size: 11px; color: var(--hub-text-muted); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hub-nav-row-meta {
  order: 3; flex-shrink: 0;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--section-accent, var(--hub-accent));
  padding: 4px 9px; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--section-accent, var(--hub-accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--section-accent, var(--hub-accent)) 30%, transparent);
}

@media (max-width: 640px) {
  .hub-nav-row-meta { display: none; }
}

/* ── 9. Right rail ── */
.hub-hot-topics {
  padding: var(--space-4); border: 1px solid var(--hub-border);
  border-radius: var(--radius-md); background: var(--hub-surface);
}

.hub-hot-topics-track { display: flex; flex-direction: column; gap: 2px; }
.hub-hot-marquee { display: none !important; }

.hub-hot-topic {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: var(--space-3); min-height: 40px;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  border: 1px solid transparent; text-decoration: none; color: var(--hub-text-body);
  font-size: var(--text-sm); font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.hub-hot-topic:hover { background: var(--hub-surface-card); border-color: var(--hub-border); color: var(--hub-accent); }
.hub-hot-topic-heat { font-weight: 700; color: var(--hub-accent); min-width: 28px; }
.hub-hot-topic-name { color: inherit; }
.hub-hot-topic-trend--up { color: #39ff14; }
.hub-hot-topic-trend--down { color: #f87171; }
.hub-hot-topic-trend--steady { color: var(--hub-text-muted); }

.hub-signal-widget {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border: 1px solid var(--hub-border);
  border-radius: var(--radius-md); background: var(--hub-surface-card);
}
.hub-signal-row {
  display: grid; grid-template-columns: 1fr 1fr auto auto;
  align-items: center; gap: var(--space-2); min-height: 36px;
  text-decoration: none; color: inherit; padding: 4px 0;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.hub-signal-row:hover { background: var(--hub-surface-hover); }
.hub-signal-name { font-size: var(--text-xs); font-weight: 500; color: var(--hub-text); }
.hub-signal-bar { height: 4px; border-radius: 2px; background: rgba(251, 113, 133, 0.12); overflow: hidden; }
.hub-signal-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hub-accent), var(--hub-accent-2)); }
.hub-signal-heat { font-size: var(--text-xs); font-weight: 700; color: var(--hub-accent); min-width: 24px; text-align: right; }
.hub-signal-trend { font-size: var(--text-xs); font-weight: 600; }
.hub-signal-trend--up { color: #39ff14; }
.hub-signal-trend--down { color: #f87171; }

.hub-glance-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.hub-glance-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 72px; padding: var(--space-3);
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface-card); text-decoration: none; text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.hub-glance-stat:hover { border-color: var(--hub-border-strong); transform: translateY(-2px); }
.hub-glance-stat strong { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--hub-accent); line-height: 1; }
.hub-glance-stat span { font-size: var(--text-xs); color: var(--hub-text-muted); margin-top: 4px; }

.hub-just-added-track { display: flex; flex-direction: column; gap: var(--space-2); }
.hub-just-card {
  display: block; padding: var(--space-3);
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface-card); text-decoration: none; color: inherit;
  min-height: var(--hub-row-h); transition: border-color 0.15s;
}
.hub-just-card:hover { border-color: var(--hub-border-strong); }
.hub-just-tag { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hub-accent); margin-bottom: 4px; }
.hub-just-card strong { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--hub-text); line-height: 1.35; margin-bottom: 4px; }
.hub-just-meta { font-size: var(--text-xs); color: var(--hub-text-muted); }

.hub-rail-pulse-link {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-3);
  border: 1px solid var(--hub-border-strong); border-radius: var(--radius-md);
  background: rgba(251, 113, 133, 0.06); color: var(--hub-accent);
  font-size: var(--text-sm); font-weight: 600; text-decoration: none;
  transition: background 0.15s;
}
.hub-rail-pulse-link:hover { background: rgba(251, 113, 133, 0.12); }

.hub-rail-elsewhere { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-3); font-size: var(--text-xs); color: var(--hub-text-muted); }
.hub-rail-elsewhere a { color: var(--hub-text-body); text-decoration: none; }
.hub-rail-elsewhere a:hover { color: var(--hub-accent); }
.hub-rail-elsewhere span { color: var(--hub-border-strong); }

/* ── 10. Featured + CTA ── */
.hub-featured-report {
  padding: var(--space-6); border: 1px solid var(--hub-border);
  border-radius: var(--radius-lg); background: var(--hub-surface);
}
.hub-featured-report h2 { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--hub-text); margin-bottom: var(--space-3); }
.hub-featured-report p { color: var(--hub-text-body); max-width: 65ch; }
.hub-report-meta { font-size: var(--text-sm); color: var(--hub-text-muted); margin-top: var(--space-2); }

.hub-footer-cta-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding: var(--space-4) var(--space-5);
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface); color: var(--hub-text-body); font-size: var(--text-sm);
}
.hub-footer-cta-live { font-size: var(--text-xs); font-weight: 600; color: var(--hub-accent); text-transform: uppercase; letter-spacing: 0.06em; }

.hub-crosslink {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-5); border: 1px solid rgba(251, 113, 133, 0.12);
  border-radius: var(--radius-md);
  background: rgba(251, 113, 133, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--hub-text-body); font-size: var(--text-sm); line-height: 1.6;
}
.hub-crosslink a { color: var(--hub-accent); }

/* ── 11. Inner pages ── */
.hub-page-head { margin-bottom: var(--space-10); }
.hub-page-head .eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hub-accent); margin-bottom: var(--space-3); }
.hub-page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--space-5);
  background: linear-gradient(135deg, var(--hub-text) 0%, rgba(251, 113, 133, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hub-page-head p { color: var(--hub-text-body); max-width: 58ch; font-size: var(--text-base); line-height: 1.7; }
.hub-status-pill { display: inline-block; padding: 4px 12px; font-size: var(--text-xs); font-weight: 500; color: var(--hub-text-muted); border: 1px solid var(--hub-border); border-radius: var(--radius-full); background: var(--hub-surface); }

.hub-demo-note {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4); margin-bottom: var(--space-6);
  border: 1px solid var(--hub-border); border-radius: var(--radius-md);
  background: var(--hub-surface); color: var(--hub-text-body); font-size: var(--text-sm);
}
.hub-demo-note code { font-family: var(--font-mono); font-size: 0.9em; color: var(--hub-accent); }

.hub-card-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 640px) { .hub-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hub-card-grid--updates { grid-template-columns: repeat(3, 1fr); } }

.hub-update-card, .hub-resource-card {
  display: block; padding: var(--space-5); min-height: var(--hub-row-h);
  border: 1px solid var(--hub-glass-border); border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.hub-update-card:hover, .hub-resource-card:hover {
  border-color: rgba(251, 113, 133, 0.22); background: var(--hub-glass-hover); transform: translateY(-2px);
}
.hub-update-card h3, .hub-resource-card h3 { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; color: var(--hub-text); margin: var(--space-2) 0; line-height: 1.35; }
.hub-update-card p, .hub-resource-card p { font-size: var(--text-sm); color: var(--hub-text-body); margin-bottom: var(--space-3); }
.hub-update-meta, .hub-resource-meta { font-size: var(--text-xs); color: var(--hub-text-muted); }

.hub-tag-chip { display: inline-block; padding: 2px 8px; font-size: var(--text-xs); font-weight: 600; color: var(--hub-accent); border: 1px solid rgba(251, 113, 133, 0.25); border-radius: var(--radius-full); background: rgba(251, 113, 133, 0.08); }
.hub-tag-chip--pulse { color: var(--hub-accent-2); border-color: rgba(176, 38, 255, 0.25); background: rgba(176, 38, 255, 0.08); }
.hub-level-badge { font-size: var(--text-xs); color: var(--hub-text-muted); }

/* Report cards — generated hero art, hero stat, and a featured lead card so the 3 don't read identically */
.hub-resource-card--report { position: relative; overflow: hidden; }
.hub-report-card-icon { position: absolute; top: -14px; right: -14px; width: 84px; height: 84px; color: var(--hub-accent); opacity: 0.09; pointer-events: none; }
.hub-report-card-stat { display: flex; align-items: baseline; gap: 6px; margin: var(--space-2) 0 var(--space-3); }
.hub-report-card-stat b { font-family: var(--font-display); font-size: var(--text-xl); color: var(--hub-accent); font-weight: 700; }
.hub-report-card-stat span { font-size: var(--text-xs); color: var(--hub-text-muted); }

/* Guide card thumbnail — small topic-color square with icon */
.hub-resource-card--thumb { position: relative; padding-top: var(--space-4); }
.hub-card-thumb { width: 48px; height: 48px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; margin-bottom: var(--space-3); }
.hub-card-thumb svg { display: block; width: 100%; height: 100%; }

/* Generated hero art — banner strip on standard cards, full-bleed background on the featured card */
.hub-hero-media { position: relative; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4); overflow: hidden; border-radius: var(--radius-md) var(--radius-md) 0 0; aspect-ratio: 3.4 / 1; background: var(--hub-surface-hover); }
.hub-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hub-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,26,0) 40%, rgba(10,14,26,0.75) 100%); pointer-events: none; }
.hub-hero-copyright { position: absolute; bottom: 6px; right: 10px; font-size: 10px; letter-spacing: 0.03em; color: rgba(241,245,249,0.55); text-shadow: 0 1px 2px rgba(0,0,0,0.6); pointer-events: none; }

.hub-resource-card--featured { padding: 0; overflow: hidden; }
.hub-resource-card--featured .hub-hero-media { position: absolute; inset: 0; margin: 0; border-radius: 0; aspect-ratio: auto; }
.hub-resource-card--featured .hub-hero-scrim { background: linear-gradient(90deg, rgba(10,14,26,0.94) 0%, rgba(10,14,26,0.88) 32%, rgba(10,14,26,0.35) 62%, rgba(10,14,26,0.55) 100%); }

/* Small in-article figure — complements the article, doesn't dominate it */
.hub-article-figure { margin: var(--space-6) 0 var(--space-8); border: 1px solid var(--hub-glass-border); border-radius: var(--radius-md); overflow: hidden; max-width: 100%; background: var(--hub-glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hub-article-figure img { display: block; width: 100%; height: auto; object-fit: cover; object-position: center; }
.hub-article-figure figcaption { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); font-size: var(--text-xs); color: var(--hub-text-muted); background: rgba(0, 0, 0, 0.15); border-top: 1px solid var(--hub-glass-border); }
.hub-resource-card--featured .hub-featured-body,
.hub-resource-card--featured .hub-featured-chart { position: relative; z-index: 1; }
.hub-resource-card--featured { padding: var(--space-5) var(--space-6); }
.hub-resource-card--featured .hub-hero-copyright { bottom: var(--space-3); right: var(--space-4); font-size: var(--text-xs); }

.hub-resource-card--featured {
  grid-column: 1 / -1; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
}
.hub-resource-card--featured .hub-report-card-icon { width: 128px; height: 128px; top: -24px; right: -20px; opacity: 0.08; }
.hub-featured-body { flex: 1; min-width: 0; }
.hub-featured-chart { flex: 0 0 260px; }
.hub-featured-chart .hub-report-bar-row { margin-bottom: var(--space-2); }
.hub-featured-chart .hub-report-bar-label { flex-basis: 118px; font-size: 10px; }
.hub-featured-eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--hub-accent); margin-bottom: 4px; }
@media (max-width: 768px) { .hub-resource-card--featured { flex-direction: column; align-items: stretch; } .hub-featured-chart { flex: none; } }

.hub-repo-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 768px) { .hub-repo-grid { grid-template-columns: repeat(2, 1fr); } }
.hub-repo-card { display: block; padding: var(--space-5); border: 1px solid var(--hub-glass-border); border-radius: var(--radius-md); background: var(--hub-glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-decoration: none; color: inherit; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.hub-repo-card:hover { border-color: rgba(251, 113, 133, 0.22); background: var(--hub-glass-hover); transform: translateY(-2px); }
.hub-repo-name { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--hub-accent); margin-bottom: var(--space-2); }
.hub-repo-card h3 { font-size: var(--text-base); font-weight: 600; color: var(--hub-text); margin-bottom: var(--space-2); }
.hub-repo-card p { font-size: var(--text-sm); color: var(--hub-text-body); margin-bottom: var(--space-3); }
.hub-repo-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-xs); color: var(--hub-text-muted); }
.hub-repo-stars { color: var(--hub-accent-warm); }
.hub-repo-lang { font-family: var(--font-mono); }

.hub-links-section { margin-bottom: var(--space-8); }
.hub-links-section h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--hub-text); margin-bottom: var(--space-3); }
.hub-toolbox-banner { margin-bottom: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(139,92,246,0.05) 100%); border: 1px solid rgba(34,211,238,0.15); }
.hub-toolbox-banner h2 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.hub-toolbox-banner p { font-size: var(--text-xs); color: var(--hub-text-muted); margin: 0; line-height: 1.5; }
.hub-link-list { display: flex; flex-direction: column; border: 1px solid var(--hub-border); border-radius: var(--radius-md); overflow: hidden; background: var(--hub-surface); }
.hub-link-row {
  display: grid; grid-template-columns: 40px 1fr 24px; align-items: center;
  gap: var(--space-3); min-height: var(--hub-row-h); padding: 0 var(--space-4);
  text-decoration: none; color: inherit; border-bottom: 1px solid var(--hub-border); transition: background 0.15s;
}
.hub-link-row:last-child { border-bottom: none; }
.hub-link-row:hover { background: var(--hub-surface-card); }
.hub-link-favicon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: rgba(251, 113, 133, 0.1); font-size: var(--text-xs); font-weight: 700; color: var(--hub-accent); }
.hub-link-body strong { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--hub-text); }
.hub-link-body span { display: block; font-size: var(--text-xs); color: var(--hub-text-muted); margin-top: 2px; }
.hub-link-arrow { color: var(--hub-accent); }

.hub-pulse-stage { margin-bottom: var(--space-8); padding: var(--space-6); border: 1px solid var(--hub-border); border-radius: var(--radius-lg); background: var(--hub-surface); }
.hub-pulse-stage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.hub-pulse-stage-head h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--hub-text); }
.hub-pulse-live { font-size: var(--text-xs); font-weight: 600; color: var(--hub-accent); text-transform: uppercase; letter-spacing: 0.06em; }
.hub-pulse-radar-wrap { position: relative; aspect-ratio: 1; max-width: 400px; margin: 0 auto; }
.hub-pulse-radar { width: 100%; height: 100%; }
.hub-pulse-radar-core { position: absolute; inset: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.hub-pulse-radar-label { font-size: var(--text-xs); font-weight: 600; color: var(--hub-text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.hub-pulse-radar-svg { width: 100%; height: 100%; }
.hub-pulse-ring, .hub-pulse-spoke { stroke: var(--hub-border); stroke-width: 1; }
.hub-pulse-label { fill: var(--hub-text-muted); font-size: 10px; }
.hub-pulse-pulse { animation: hubPulseRing 2.5s ease-in-out infinite; }
.hub-pulse-toolbar { margin-bottom: var(--space-4); }
.hub-pulse-select { min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--hub-border); border-radius: var(--radius-md); background: var(--hub-surface-card); color: var(--hub-text); font-size: var(--text-sm); }
.hub-pulse-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 640px) { .hub-pulse-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hub-pulse-grid { grid-template-columns: repeat(3, 1fr); } }
.hub-pulse-card { padding: var(--space-5); border: 1px solid var(--hub-glass-border); border-radius: var(--radius-md); background: var(--hub-glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hub-pulse-card-head { display: flex; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.hub-pulse-card-title h3 { font-size: var(--text-base); font-weight: 600; color: var(--hub-text); margin-bottom: var(--space-2); }
.hub-pulse-heat-value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--heat-color, var(--hub-accent)); }
.hub-pulse-heat-label { font-size: var(--text-xs); color: var(--hub-text-muted); }
.hub-pulse-card-mid { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.hub-pulse-spark { width: 80px; height: 28px; }
.hub-pulse-trend { font-size: var(--text-sm); font-weight: 600; }
.hub-pulse-trend--up { color: #39ff14; }
.hub-pulse-trend--down { color: #f87171; }
.hub-pulse-trend--steady { color: var(--hub-text-muted); }
.hub-pulse-signal { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--hub-text-muted); }

/* Reusable pill button — CTAs inside interactive sections (predictor, quiz) */
.hub-pill-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--space-3); border: 1px solid var(--hub-border); border-radius: var(--radius-full); background: transparent; color: var(--hub-accent); font-size: var(--text-xs); font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hub-pill-btn:hover { border-color: var(--hub-accent); }

/* Trend Predictor — guess-the-heat matchup game, replaces the old static benchmark table */
.hub-pulse-predictor { margin-top: var(--space-8); padding: var(--space-5) var(--space-6); border: 1px solid var(--hub-border); border-radius: var(--radius-lg); background: var(--hub-surface); }
.hub-pulse-predictor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: 2px; }
.hub-predictor-score { flex-shrink: 0; padding: 4px var(--space-3); border: 1px solid var(--hub-border); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; color: var(--hub-accent); white-space: nowrap; }
.hub-pulse-predictor-sub { font-size: var(--text-xs); color: var(--hub-text-muted); margin-bottom: var(--space-5); }

.hub-predictor-matchup { display: flex; align-items: stretch; gap: var(--space-4); }
.hub-predictor-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 116px; padding: var(--space-4); text-align: center;
  border: 1px solid var(--hub-border); border-radius: var(--radius-md); background: var(--hub-surface-card);
  color: inherit; font-family: inherit; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.hub-predictor-card:hover:not(:disabled) { border-color: var(--hub-accent); transform: translateY(-2px); }
.hub-predictor-card:disabled { cursor: default; }
.hub-predictor-card.is-correct { border-color: #39ff14; background: rgba(57, 255, 20, 0.08); }
.hub-predictor-card.is-wrong { border-color: #f87171; background: rgba(248, 113, 113, 0.08); }
.hub-predictor-category { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hub-text-muted); }
.hub-predictor-name { font-family: var(--font-display); font-size: var(--text-base); color: var(--hub-text); line-height: 1.25; }
.hub-predictor-heat { font-family: var(--font-mono); font-size: var(--text-lg); font-weight: 700; color: var(--hub-accent); min-height: 1.2em; }
.hub-predictor-vs { flex-shrink: 0; align-self: center; font-family: var(--font-display); font-size: var(--text-xs); font-weight: 700; color: var(--hub-text-muted); letter-spacing: 0.05em; }
.hub-predictor-result { min-height: 1.4em; margin-top: var(--space-4); font-size: var(--text-sm); color: var(--hub-text-body); }
.hub-predictor-next { margin-top: var(--space-3); }
@media (max-width: 560px) { .hub-predictor-matchup { flex-direction: column; } .hub-predictor-vs { padding: 2px 0; } }

/* Article quick-check quiz (hub-article-quiz.js) + AI IQ Check on /ai-hub/links */
.hub-article-quiz { margin: 1.75rem 0; padding: 1.2rem 1.3rem; border: 1px solid var(--hub-border); border-radius: 14px; background: var(--hub-surface); }
.hub-quiz { margin-bottom: var(--space-8); padding: var(--space-5) var(--space-6); border: 1px solid var(--hub-border); border-radius: var(--radius-lg); background: var(--hub-surface); }
.hub-quiz-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-2); }
.hub-quiz-head h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--hub-text); }
.hub-quiz-progress { flex-shrink: 0; font-size: var(--text-xs); color: var(--hub-text-muted); white-space: nowrap; }
.hub-quiz-question { margin: var(--space-4) 0 var(--space-3); font-size: var(--text-base); font-weight: 600; color: var(--hub-text); }
.hub-quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 640px) { .hub-quiz-options { grid-template-columns: 1fr; } }
.hub-quiz-option { text-align: left; padding: var(--space-3) var(--space-4); border: 1px solid var(--hub-border); border-radius: var(--radius-md); background: var(--hub-surface-card); color: var(--hub-text-body); font-family: inherit; font-size: var(--text-sm); cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.hub-quiz-option:hover:not(:disabled) { border-color: var(--hub-accent); transform: translateY(-1px); }
.hub-quiz-option:disabled { cursor: default; }
.hub-quiz-option.is-correct { border-color: #39ff14; background: rgba(57, 255, 20, 0.08); color: var(--hub-text); }
.hub-quiz-option.is-wrong { border-color: #f87171; background: rgba(248, 113, 113, 0.08); color: var(--hub-text); }
.hub-quiz-feedback { min-height: 1.4em; margin-top: var(--space-4); font-size: var(--text-sm); color: var(--hub-text-muted); }
.hub-quiz-feedback a { color: var(--hub-accent); }
.hub-quiz-next { margin-top: var(--space-3); }
.hub-quiz-result { text-align: center; padding: var(--space-5) 0 var(--space-2); }
.hub-quiz-result-score { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--hub-text); }
.hub-quiz-result-tier { margin-top: 6px; font-size: var(--text-sm); color: var(--hub-accent); font-weight: 600; }
.hub-quiz-result-actions { display: flex; gap: var(--space-3); justify-content: center; margin-top: var(--space-5); flex-wrap: wrap; }

.hub-glossary-controls { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }
@media (min-width: 768px) { .hub-glossary-controls { flex-direction: row; align-items: center; } }
.hub-glossary-search-wrap { position: relative; flex: 1; }
.hub-glossary-search-icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--hub-text-muted); }
.hub-glossary-search-wrap input { width: 100%; min-height: 48px; padding: 0 var(--space-4) 0 calc(var(--space-4) + 28px); border: 1px solid var(--hub-border-strong); border-radius: var(--radius-md); background: var(--hub-surface-card); color: var(--hub-text); }
.hub-glossary-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hub-glossary-chip { min-height: 36px; padding: 0 var(--space-3); border: 1px solid var(--hub-border); border-radius: var(--radius-full); background: transparent; color: var(--hub-text-body); font-size: var(--text-sm); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.hub-glossary-chip[aria-pressed="true"], .hub-glossary-chip.is-active, .hub-glossary-chip:hover { border-color: var(--hub-accent); color: var(--hub-accent); }
.hub-glossary-count { font-size: var(--text-sm); color: var(--hub-text-muted); margin-bottom: var(--space-4); }
.hub-glossary-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 640px) { .hub-glossary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hub-glossary-grid { grid-template-columns: repeat(3, 1fr); } }
/* Cards are <button>s — kill UA light-gray fills so glass faces stay dark */
.hub-glossary-card {
  appearance: none; -webkit-appearance: none;
  display: block; width: 100%; margin: 0; padding: 0;
  border: none; border-radius: var(--radius-md);
  background: transparent; color: inherit; font: inherit; text-align: left;
  perspective: 800px; min-height: 140px; cursor: pointer;
}
.hub-glossary-card:focus-visible { outline: none; box-shadow: var(--hub-focus-ring); }
.hub-glossary-card-inner { position: relative; width: 100%; height: 100%; min-height: 140px; transition: transform 0.4s var(--hub-ease); transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.hub-glossary-card.is-flipped .hub-glossary-card-inner { transform: rotateY(180deg); }
.hub-glossary-face {
  position: absolute; inset: 0; padding: var(--space-4);
  border: 1px solid rgba(176, 38, 255, 0.22); border-radius: var(--radius-md);
  background:
    linear-gradient(165deg, rgba(18, 24, 42, 0.94), rgba(8, 12, 24, 0.92)),
    rgba(10, 14, 26, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px -18px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; text-align: left;
  color: var(--hub-text);
}
.hub-glossary-card:hover .hub-glossary-face {
  border-color: rgba(251, 113, 133, 0.28);
  background:
    linear-gradient(165deg, rgba(22, 30, 52, 0.96), rgba(10, 14, 28, 0.94)),
    rgba(12, 18, 32, 0.98);
}
/* Belt-and-suspenders: some engines still let the inactive 3D face bleed through
   backface-visibility, so hide it explicitly instead of relying on that alone. */
.hub-glossary-card:not(.is-flipped) .hub-glossary-back { visibility: hidden; }
.hub-glossary-card.is-flipped .hub-glossary-front { visibility: hidden; }
.hub-glossary-back { transform: rotateY(180deg); }
.hub-glossary-term { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; color: #f4f9ff; margin-bottom: 2px; }
.hub-glossary-full {
  font-size: var(--text-xs); color: #9aabc0; margin-bottom: var(--space-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-glossary-card .hub-level-badge { margin-top: auto; align-self: flex-start; color: #8a9bb3; }
.hub-glossary-card .hub-glossary-flip-hint { margin-top: var(--space-2); }
.hub-glossary-cat {
  font-size: var(--text-xs); font-weight: 600;
  color: #7ddfff; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.hub-glossary-def { font-size: var(--text-sm); color: #c5d4e4; line-height: 1.55; }
.hub-glossary-example-label { font-size: var(--text-xs); font-weight: 600; color: #8a9bb3; margin-top: var(--space-3); }
.hub-glossary-example { font-size: var(--text-sm); color: #c5d4e4; font-style: italic; }
.hub-glossary-flip-hint { font-size: var(--text-xs); color: #7a8ba3; margin-top: auto; }
.hub-glossary-empty, .hub-empty-state { padding: var(--space-10) var(--space-6); text-align: center; border: 1px dashed var(--hub-border); border-radius: var(--radius-lg); color: var(--hub-text-body); }
.hub-empty-state h2 { font-family: var(--font-display); font-size: var(--text-xl); color: var(--hub-text); margin-bottom: var(--space-3); }

/* ── 12. Article reading — open editorial layout on starfield, not a monolithic box ── */
.hub-back-link { display: flex; align-items: center; min-height: 44px; width: 100%; max-width: 1120px; margin: 0 auto var(--space-5); color: var(--hub-text-muted); text-decoration: none; font-size: var(--text-sm); }
.hub-back-link:hover { color: var(--hub-accent); }

body.hub-reading-mode .hub-main-inner { max-width: none; }

.hub-article-shell { display: flex; gap: var(--space-8); align-items: flex-start; max-width: 1120px; width: 100%; margin: 0 auto; }
.hub-article-shell .hub-article { flex: 1; min-width: 0; }

.hub-article-rail { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: var(--space-5); }
@media (min-width: 1024px) {
  .hub-article-rail { position: sticky; top: calc(var(--nav-h) + var(--space-5)); }
}
@media (max-width: 899px) {
  .hub-article-shell { flex-direction: column; gap: var(--space-6); }
  .hub-article-rail { width: 100%; }
}

.hub-article-rail-card {
  padding: var(--space-5);
  border: 1px solid var(--hub-glass-border);
  border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hub-article-rail-card h3 {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  color: var(--hub-text); margin-bottom: var(--space-3);
}
.hub-article-facts { display: flex; flex-direction: column; gap: var(--space-3); }
.hub-article-fact { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.hub-article-fact dt { color: var(--hub-text-muted); }
.hub-article-fact dd { margin: 0; font-weight: 600; color: var(--hub-accent); font-family: var(--font-mono); }

/* Article container: transparent — content breathes on the starfield */
.hub-article, .hub-main-inner.hub-article {
  max-width: none; padding: 0;
  border: none; border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.hub-reading-mode .hub-article,
body.hub-reading-mode .hub-main-inner.hub-article {
  background: transparent;
  border: none;
  box-shadow: none;
}

.hub-article-head { margin-bottom: var(--space-6); }
.hub-article-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--hub-text);
  margin: var(--space-3) 0 var(--space-4);
}
.hub-article-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4);
  font-size: var(--text-sm); color: var(--hub-text-muted);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-article-hero {
  position: relative; margin: 0 0 var(--space-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hub-glass-border);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(var(--hub-glass-blur));
  -webkit-backdrop-filter: blur(var(--hub-glass-blur));
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(251, 113, 133, 0.06);
}
.hub-article-hero img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }

/* CSS-only ayraix.com mark — never burn into hero pixels */
.hub-article-hero::before,
.hub-update-card-art::before {
  content: "ayraix.com";
  position: absolute;
  top: 4.5%;
  right: 4.5%;
  z-index: 2;
  font-family: var(--font-display), system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(0.5rem, 0.85vw, 0.68rem);
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 1px 1px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  user-select: none;
}
.hub-update-card:has(.hub-update-card-art) {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.hub-update-card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hub-glass-bg);
}
.hub-update-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hub-update-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}
.hub-update-card:has(.hub-update-card-art) .hub-tag-chip { margin-top: 0; }

.hub-article-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,6,15,0) 55%, rgba(5,6,15,0.45) 100%),
              linear-gradient(90deg, rgba(251, 113, 133, 0.08) 0%, transparent 35%);
  pointer-events: none; mix-blend-mode: screen;
}

.hub-article-body {
  color: var(--hub-text-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 68ch;
}
.hub-article-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: var(--space-10) 0 var(--space-4);
  padding-top: var(--space-2);
  /* Soft theme-aware section headings — muted mix of each article’s
     --accent/--accent2 (hub pages set unique pairs) into slate. */
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent, #fb7185) 48%, #e2e8f0),
    color-mix(in srgb, var(--accent2, #34d399) 40%, #94a3b8) 48%,
    #94a3b8
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hub-article-body h2:first-child { margin-top: 0; }
/* Quiz/publisher/xlinks/engage/recent chrome h2s stay solid white
   (same exclusion as community/trendz sample). */
.hub-article-body .hub-article-quiz h2,
.hub-article-body .hub-quiz-head h2,
.hub-article-body .hub-publisher h2,
.hub-article-body .hub-xlinks h2,
.hub-article-body .hub-engage h2,
.hub-article-body .hub-recent-updates h2 {
  background: none;
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--hub-text);
  -webkit-text-fill-color: var(--hub-text);
}
.hub-article-body p { margin-bottom: var(--space-5); }
.hub-article-body p strong { color: var(--hub-text); }
.hub-article-body a:any-link {
  color: var(--link, var(--hub-accent, #67e8f9));
  -webkit-text-fill-color: currentColor;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(103, 232, 249, 0.4);
}
.hub-article-body a:hover {
  color: var(--link-hover, #a5f3fc);
  -webkit-text-fill-color: currentColor;
  text-decoration-color: currentColor;
}
.hub-article-body ul, .hub-article-body ol { margin: 0 0 var(--space-5) var(--space-6); }
.hub-article-body li { margin-bottom: var(--space-2); }
.hub-article-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.hub-article-sources {
  margin-top: var(--space-10); padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--text-sm); color: var(--hub-text-muted);
  max-width: 68ch;
}
.hub-article-sources h3 { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; color: var(--hub-text); margin-bottom: var(--space-3); }
.hub-article-sources a:any-link {
  color: var(--link, var(--hub-accent, #67e8f9));
  -webkit-text-fill-color: currentColor;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(103, 232, 249, 0.4);
}
.hub-article-sources a:hover {
  color: var(--link-hover, #a5f3fc);
  -webkit-text-fill-color: currentColor;
  text-decoration-color: currentColor;
}

/* Report visual masala — glass panels, not nested solid boxes */
.hub-report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-6) 0 var(--space-8); max-width: 68ch; }
@media (max-width: 560px) { .hub-report-stats { grid-template-columns: 1fr 1fr; } }
.hub-report-stat {
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--hub-glass-border);
  border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}
.hub-report-stat-value { display: block; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--hub-accent); line-height: 1.1; }
.hub-report-stat-label { display: block; margin-top: 4px; font-size: var(--text-xs); color: var(--hub-text-muted); }

.hub-report-pullquote {
  margin: var(--space-8) 0; padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--hub-accent);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display); font-size: var(--text-xl); color: var(--hub-text); line-height: 1.4;
  max-width: 68ch;
}
.hub-report-pullquote span { display: block; margin-top: var(--space-2); font-family: var(--font-sans, inherit); font-size: var(--text-sm); color: var(--hub-text-muted); font-weight: 400; }

.hub-report-chart {
  margin: var(--space-8) 0; padding: var(--space-5) var(--space-6);
  border: 1px solid var(--hub-glass-border);
  border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 68ch;
}
.hub-report-chart-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--hub-text-muted); margin-bottom: var(--space-4); }
.hub-report-bar-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.hub-report-bar-row:last-child { margin-bottom: 0; }
.hub-report-bar-label { flex: 0 0 168px; font-size: var(--text-xs); color: var(--hub-text-body); }
.hub-report-bar-track { flex: 1; height: 8px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.hub-report-bar-fill { display: block; height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--hub-accent), rgba(251, 113, 133, 0.6)); }
.hub-report-bar-value { flex: 0 0 34px; text-align: right; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--hub-text-muted); }
@media (max-width: 560px) { .hub-report-bar-label { flex-basis: 100px; } }

.hub-report-icon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-6) 0 var(--space-5); max-width: 68ch; }
@media (max-width: 560px) { .hub-report-icon-grid { grid-template-columns: 1fr; } }
.hub-report-icon-card {
  display: flex; gap: var(--space-3); padding: var(--space-4);
  border: 1px solid var(--hub-glass-border);
  border-radius: var(--radius-md);
  background: var(--hub-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hub-report-icon-card .hub-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--hub-accent); margin-top: 2px; }
.hub-report-icon-card strong { display: block; font-size: var(--text-sm); color: var(--hub-text); margin-bottom: 2px; }
.hub-report-icon-card p { margin: 0; font-size: var(--text-xs); color: var(--hub-text-muted); line-height: 1.5; }

.hub-reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 240; background: transparent; }
.hub-reading-progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--hub-accent), var(--hub-accent-2)); transition: width 0.1s linear; }

/* ── Editorial Depth — reports index (open glass, not box-in-box) ── */
.hub-editorial-main { max-width: 920px; }
.hub-editorial-head { margin-bottom: var(--space-10); }
.hub-editorial-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-5);
  background: linear-gradient(135deg, var(--hub-text) 0%, rgba(251, 113, 133, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hub-editorial-lede { font-size: var(--text-base); line-height: 1.7; max-width: 58ch; }

.hub-editorial-ribbon {
  display: flex; flex-wrap: wrap; gap: var(--space-6);
  margin-bottom: var(--space-10); padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-editorial-ribbon-item { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.hub-editorial-ribbon-value {
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600;
  color: var(--hub-text); letter-spacing: -0.01em;
}
.hub-editorial-ribbon-label { font-size: var(--text-xs); color: var(--hub-text-muted); }

.hub-editorial-stage { display: flex; flex-direction: column; gap: var(--space-8); }

.hub-editorial-lead {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--space-8); align-items: center;
  padding: var(--space-7) var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 32, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.hub-editorial-lead:hover {
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(14, 22, 38, 0.52);
  transform: translateY(-2px);
}
.hub-editorial-lead-art {
  margin: 0; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.2);
}
.hub-editorial-lead-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hub-editorial-lead-body { min-width: 0; }
.hub-editorial-kicker {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hub-accent); margin-bottom: var(--space-3);
}
.hub-editorial-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.hub-editorial-lead h2 {
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700; color: var(--hub-text); line-height: 1.2;
  margin: 0 0 var(--space-4);
}
.hub-editorial-lead p { font-size: var(--text-sm); color: var(--hub-text-body); line-height: 1.65; margin-bottom: var(--space-5); }
.hub-editorial-lead-stats {
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--text-xs); color: var(--hub-text-muted);
}
.hub-editorial-lead-stats strong {
  display: block; font-family: var(--font-display); font-size: var(--text-lg);
  font-weight: 700; color: var(--hub-accent); margin-bottom: 2px;
}

.hub-editorial-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-6);
}
@media (min-width: 720px) { .hub-editorial-grid { grid-template-columns: repeat(3, 1fr); } }

.hub-editorial-card {
  display: flex; flex-direction: column;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 14, 26, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.hub-editorial-card:hover {
  border-color: rgba(176, 38, 255, 0.2);
  background: rgba(12, 18, 32, 0.48);
  transform: translateY(-2px);
}
.hub-editorial-card-art {
  margin: 0 0 var(--space-4); border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}
.hub-editorial-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hub-editorial-card h3 {
  font-family: var(--font-display); font-size: var(--text-base); font-weight: 600;
  color: var(--hub-text); line-height: 1.35; margin: var(--space-2) 0 var(--space-3);
}
.hub-editorial-card p { font-size: var(--text-sm); color: var(--hub-text-body); line-height: 1.6; margin-bottom: var(--space-4); flex: 1; }
.hub-editorial-crosslink {
  margin-top: var(--space-10);
  background: rgba(251, 113, 133, 0.03);
  border-color: rgba(251, 113, 133, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .hub-editorial-lead { grid-template-columns: 1fr; padding: var(--space-5); gap: var(--space-5); }
  .hub-editorial-lead-art { order: -1; }
}

/* ── 13. Motion + focus ── */
.reveal, .hub-stagger-item {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s var(--hub-ease), transform 0.4s var(--hub-ease);
}
.reveal.is-visible, .hub-stagger-item.is-visible { opacity: 1; transform: none; }

body.ai-hub-page a:focus-visible,
body.ai-hub-page button:focus-visible,
body.ai-hub-page input:focus-visible,
body.ai-hub-page select:focus-visible { outline: none; box-shadow: var(--hub-focus-ring); }

@media (prefers-reduced-motion: reduce) {
  .hub-hero::before, .hub-signal-pulse, .hub-pulse-pulse, .hub-nav-row-accent,
  .hub-hero .hero-badge::after, .hub-brief-card__shimmer::after { animation: none; }
  .hub-nav-row::before { display: none; }
  .reveal, .hub-stagger-item, .hub-glossary-card-inner, .hub-brief-card { transition: none; opacity: 1; transform: none; }
}

/* Landing hero band — full-bleed within hub-main column.
   shared.css caps .hero-band-media at max-height:560 + aspect 16/9, which
   letterboxes (empty dark gutters) once the main column exceeds ~995px wide.
   Kill that cap, drop the duplicate nav padding, and span the column edge-to-edge. */
.hub-hero.hero-band {
  margin: 0 0 var(--space-4);
  padding: 0;
  width: calc(100% + 2 * var(--space-4));
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
}
@media (min-width: 768px) {
  .hub-hero.hero-band {
    width: calc(100% + 2 * var(--space-6));
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
  }
}
@media (min-width: 1024px) {
  .hub-hero.hero-band {
    width: calc(100% + 2 * var(--space-8));
    margin-left: calc(-1 * var(--space-8));
    margin-right: calc(-1 * var(--space-8));
  }
}
@media (min-width: 1200px) {
  /* Rail is present — bleed only the left main-inner gutter; keep the
     right edge flush with dashboard-main so we don't eat the rail gap. */
  .hub-hero.hero-band {
    width: calc(100% + var(--space-8));
    margin-left: calc(-1 * var(--space-8));
    margin-right: 0;
  }
}
.hub-hero.hero-band .hero-band-media {
  width: 100%;
  max-width: none;
  max-height: none;
  min-height: clamp(280px, 38vw, 560px);
  aspect-ratio: 8 / 5; /* native ai-hub-hero.webp 1600×1000 — taller than 16/9 letterbox */
  padding-top: 0; /* hub-shell already clears the site nav */
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.hub-hero.hero-band .hero-band-media img {
  object-fit: cover;
  object-position: center 55%;
}
.hub-hero.hero-band .hero-band-search-wrap {
  max-width: none;
  padding: var(--space-3) var(--space-4) 0;
}
.hub-hero.hero-band .hero-band-copy {
  max-width: min(640px, 100%);
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
@media (min-width: 768px) {
  .hub-hero.hero-band .hero-band-search-wrap,
  .hub-hero.hero-band .hero-band-copy {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}
@media (min-width: 1024px) {
  .hub-hero.hero-band .hero-band-search-wrap,
  .hub-hero.hero-band .hero-band-copy {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}
@media (min-width: 1200px) {
  .hub-hero.hero-band .hero-band-search-wrap,
  .hub-hero.hero-band .hero-band-copy {
    padding-right: 0;
  }
}
@media (max-width: 900px) {
  .hub-hero.hero-band .hero-band-media {
    aspect-ratio: 16 / 10;
    min-height: 220px;
    max-height: none;
  }
}

/* ── 14. Curated article engagement (publisher / stay-with-us / xlinks / quiz) ── */
.hub-publisher {
  margin: 1.75rem 0;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.06));
}
.hub-publisher h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.65rem;
  color: var(--hub-text);
}
.hub-publisher-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-accent);
  margin: 0 0 0.35rem;
}
.hub-publisher p { color: var(--hub-text-body); line-height: 1.65; margin: 0 0 0.75rem; }
.hub-publisher p:last-child { margin-bottom: 0; }
.hub-xlinks { margin: 1.5rem 0; }
.hub-xlinks h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--hub-text);
}
.hub-xlinks ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.hub-xlinks li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.hub-xlinks a:any-link {
  color: var(--link, #67e8f9);
  -webkit-text-fill-color: currentColor;
  text-decoration: none;
  font-size: 0.95rem;
}
.hub-xlinks a:hover {
  color: var(--link-hover, #a5f3fc);
  -webkit-text-fill-color: currentColor;
  text-decoration: underline;
}
.hub-xlink-kind {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hub-text-muted);
  border: 1px solid var(--hub-border);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.hub-recent-updates {
  margin: 1.75rem 0;
}
.hub-recent-updates h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--hub-text);
}
.hub-recent-updates-track {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
@media (min-width: 720px) {
  .hub-recent-updates-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
}
.hub-engage {
  margin: 1.75rem 0;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  border: 1px dashed rgba(232, 121, 249, 0.35);
  background: rgba(18, 24, 42, 0.65);
}
.hub-engage-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e879f9;
  margin: 0 0 0.4rem;
}
.hub-engage h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--hub-text);
}
.hub-engage-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0;
}
.hub-engage-choice {
  background: var(--hub-surface-card);
  border: 1px solid var(--hub-border);
  color: var(--hub-text-body);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.hub-engage-choice:hover,
.hub-engage-choice.is-on {
  border-color: var(--hub-accent);
  color: var(--hub-text);
}
.hub-engage-note {
  font-size: 0.8rem;
  color: var(--hub-text-muted);
  margin: 0.4rem 0 0;
}
.hub-article-quiz {
  margin: 1.75rem 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  background: var(--hub-surface);
}

/* Stay-with-us engage polls — synthetic lean results after a choice */
.hub-engage-results {
  margin: 0.85rem 0 0.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 121, 249, 0.22);
  background: rgba(10, 14, 26, 0.45);
}
.hub-engage-results[hidden] { display: none !important; }
.hub-engage-results-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hub-text);
}
.hub-engage-results-soft {
  font-weight: 500;
  color: var(--hub-text-muted);
}
.hub-engage-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.hub-engage-results-row.is-yours .hub-engage-results-label {
  color: var(--hub-text);
}
.hub-engage-results-row.is-yours .hub-engage-results-label em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e879f9;
  margin-left: 0.25rem;
}
.hub-engage-results-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}
.hub-engage-results-label { color: var(--hub-text-body); }
.hub-engage-results-pct {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--hub-text-muted);
  font-weight: 600;
}
.hub-engage-results-row.is-yours .hub-engage-results-pct { color: #e879f9; }
.hub-engage-results-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.hub-engage-results-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(232, 121, 249, 0.55), rgba(34, 211, 238, 0.65));
  transition: width 0.35s ease;
}
.hub-engage-results-row.is-yours .hub-engage-results-bar {
  background: linear-gradient(90deg, #e879f9, rgba(34, 211, 238, 0.85));
}
.hub-engage-results-foot {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--hub-text-muted);
}