/* Homepage hub table — full-width toolbar + filter drawer (live accept v2) */
.lb-hub {
  --hub-pad: clamp(1.2rem, 2vw, 2.4rem);
  --hub-sticky-top: var(--lb-hdr-h, 6.4rem);
  --hub-table-h: 800px;
  margin: 1.6rem auto var(--lb-l, 2.4rem);
  padding: 0 var(--hub-pad);
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.lb-hub__hd { margin: 0 0 .55rem; }
.lb-hub__title {
  margin: 0 0 .25rem;
  font-size: clamp(1.7rem, 1.4rem + .8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--lb-ink, #1E2A38);
}
.lb-hub__lead {
  margin: 0;
  color: var(--lb-muted, #5B6675);
  font-size: 1.28rem;
}

/* ===== Compact wide toolbar ===== */
.lb-hub-wide-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .65rem;
  padding: .55rem .65rem;
  border: 1px solid var(--lb-border, #E2E6EB);
  border-radius: 12px;
  background: var(--lb-surface, #fff);
  box-shadow: var(--lb-shadow, 0 1px 3px rgb(11 26 42 / 6%));
}
.lb-hub-search--wide {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 1 1 14rem;
  min-width: 12rem;
  padding: .35rem .65rem;
  border: 1px solid var(--lb-border, #E2E6EB);
  border-radius: 9px;
  background: var(--lb-surface-2, #F7F8FA);
}
.lb-hub-search--wide .lb-hub-search__ico {
  color: var(--lb-muted, #5B6675);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.lb-hub-search--wide .lb-hub-search__input {
  border: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  font-size: 1.28rem;
  color: var(--lb-ink, #1E2A38);
  outline: none;
  min-width: 0;
}
.lb-hub-search--wide .lb-hub-search__input::placeholder {
  color: var(--lb-muted, #5B6675);
}
.lb-hub-wide-vertvtabs {
  display: flex;
  gap: .3rem;
  min-width: 0;
}
.lb-hub-wide-vertvtabs .lb-hub-chiprow {
  display: flex;
  gap: .3rem;
  flex-wrap: nowrap;
  min-height: 0;
}
.lb-hub-wide-vertvtabs .lb-hub-chip {
  border-radius: 999px;
  padding: .4rem .75rem;
  min-height: 0;
  font-weight: 650;
}
.lb-hub-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem;
  border-radius: 9px;
  border: 1px solid var(--lb-border, #E2E6EB);
  background: #fff;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--lb-ink, #1E2A38);
  cursor: pointer;
}
.lb-hub-filter-btn:hover {
  border-color: var(--lb-primary, #FF6A2B);
  color: var(--lb-primary, #FF6A2B);
}
.lb-hub-filter-btn[aria-expanded="true"] {
  border-color: var(--lb-primary, #FF6A2B);
  background: color-mix(in srgb, var(--lb-primary, #FF6A2B) 8%, #fff);
  color: var(--lb-ink, #1E2A38);
}
.lb-hub-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--lb-primary, #FF6A2B);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lb-hub-filter-badge[hidden] { display: none !important; }
.lb-hub-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .85rem;
  min-height: 0;
  border-radius: 9px;
  border: 1px solid var(--lb-border, #E2E6EB);
  background: #fff;
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--lb-muted, #5B6675);
  cursor: pointer;
}
.lb-hub-reset:hover {
  color: var(--lb-primary, #FF6A2B);
  border-color: var(--lb-primary, #FF6A2B);
}
.lb-hub-reset[hidden] { display: none !important; }

/* ===== Category strip ===== */
.lb-hub-wide-catstrip {
  overflow: auto;
  max-width: 100%;
}
.lb-hub-wide-catstrip .lb-hub-chiprow {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  min-height: 0;
  padding-bottom: .15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.lb-hub-wide-catstrip .lb-hub-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  min-height: 0;
  padding: .4rem .8rem;
  background: var(--lb-surface-2, #F7F8FA);
  border: 1px solid transparent;
}
.lb-hub-wide-catstrip .lb-hub-chip:hover {
  border-color: color-mix(in srgb, var(--lb-primary, #FF6A2B) 35%, transparent);
  background: #fff;
}
.lb-hub-wide-catstrip .lb-hub-chip.is-active {
  background: color-mix(in srgb, var(--lb-primary, #FF6A2B) 12%, #fff);
  border-color: color-mix(in srgb, var(--lb-primary, #FF6A2B) 40%, #fff);
  color: var(--lb-ink, #1E2A38) !important;
  box-shadow: none;
}

/* ===== Filter drawer ===== */
.lb-hub-filter-panel {
  border: 1px solid var(--lb-border, #E2E6EB);
  border-radius: 12px;
  background: color-mix(in srgb, var(--lb-surface-2, #F7F8FA) 70%, #fff);
  padding: .65rem .75rem;
}
.lb-hub-filter-panel[hidden] { display: none !important; }
.lb-hub-filter-panel .lb-hub-chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 0;
  overflow: visible;
}
.lb-hub-filter-panel .lb-hub-chip {
  min-height: 0;
  padding: .4rem .75rem;
  border-radius: 999px;
}

/* Shared chip base */
.lb-hub-chiprow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .5rem;
}
.lb-hub-chiprow--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: .15rem;
  max-width: 100%;
}
.lb-hub-chiprow--scroll .lb-hub-chip { flex: 0 0 auto; }
.lb-hub-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  max-width: 100%;
  padding: .55rem .9rem;
  min-height: 3.2rem;
  border-radius: 8px;
  border: 1px solid var(--lb-border, #E2E6EB);
  background: var(--lb-surface, #fff);
  color: var(--lb-ink, #1E2A38) !important;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.lb-hub-chip:hover {
  border-color: color-mix(in srgb, var(--lb-primary, #FF6A2B) 45%, var(--lb-border, #E2E6EB));
  background: #fff;
}
.lb-hub-chip.is-active {
  border-color: color-mix(in srgb, var(--lb-primary, #FF6A2B) 55%, var(--lb-border, #E2E6EB));
  background: color-mix(in srgb, var(--lb-primary, #FF6A2B) 10%, #fff);
  color: var(--lb-ink, #1E2A38) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lb-primary, #FF6A2B) 20%, transparent);
}
.lb-hub-chip__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--lb-muted, #5B6675);
}
.lb-hub-chip__dot--ai { background: #F4530F; }
.lb-hub-chip__dot--hosting { background: #3B82F6; }
.lb-hub-chip__dot--news { background: #22C55E; }
.lb-hub-chip__lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
.lb-hub-chip__n {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--lb-muted, #5B6675);
  min-width: 1.1em;
}
.lb-hub-chip.is-active .lb-hub-chip__n {
  color: var(--lb-primary, #FF6A2B);
}

/* legacy class hooks used by hub.js */
.lb-hub-tabs { display: contents; }
.lb-hub-tab { /* no-op shell */ }
.lb-hub-filters { display: contents; }
.lb-hub-toolbar { display: contents; }

/* ===== Table shell (baked: height 800, compact rows, tinted header) ===== */
.lb-hub-table-wrap {
  border: 1px solid var(--lb-border, #E2E6EB);
  border-radius: 12px;
  background: var(--lb-surface, #fff);
  box-shadow: var(--lb-shadow, 0 1px 3px rgb(11 26 42 / 6%));
  overflow: auto;
  max-height: min(70vh, var(--hub-table-h));
  -webkit-overflow-scrolling: touch;
}
.lb-hub .lb-tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.28rem;
  min-width: 640px;
}
.lb-hub .lb-tool-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--lb-surface-2, #F7F8FA);
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--lb-muted, #5B6675);
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--lb-border, #E2E6EB);
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--lb-border, #E2E6EB);
}
.lb-hub .lb-tool-table tbody td {
  padding: .5rem 1rem; /* compact */
  border-bottom: 1px solid color-mix(in srgb, var(--lb-border, #E2E6EB) 65%, #fff);
  vertical-align: middle;
  color: var(--lb-ink, #1E2A38);
}
.lb-hub .lb-tool-table tbody tr:hover td {
  background: color-mix(in srgb, var(--lb-primary, #FF6A2B) 5%, #fff);
}
.lb-hub .lb-tool-svc {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: inherit !important;
  text-decoration: none !important;
  font-weight: 600;
}
.lb-hub .lb-tool-svc__logo,
.lb-hub .lb-tool-svc__ph {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--lb-surface-2, #F7F8FA);
  border: 1px solid var(--lb-border, #E2E6EB);
  flex-shrink: 0;
}
.lb-hub .lb-tool-svc__ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--lb-muted, #5B6675);
}
.lb-hub .lb-tool-empty {
  text-align: center;
  color: var(--lb-muted, #5B6675);
  padding: 2rem 1rem !important;
}
.lb-hub-rank {
  width: 2.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--lb-muted, #5B6675);
  font-size: 1.12rem;
}

.lb-hub-more-wrap {
  display: flex;
  justify-content: flex-start;
  margin: .2rem 0 .2rem;
}
.lb-hub-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--lb-border, #E2E6EB);
  background: #fff;
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--lb-muted, #5B6675) !important;
  text-decoration: none !important;
  cursor: pointer;
}
.lb-hub-more:hover {
  border-color: var(--lb-primary, #FF6A2B);
  color: var(--lb-primary, #FF6A2B) !important;
}
.lb-hub-more.is-loading { opacity: .6; pointer-events: none; }
.lb-hub-more__meta { color: var(--lb-muted, #5B6675); font-weight: 500; }
.lb-hub-meta {
  margin: 0;
  font-size: 1.12rem;
  color: var(--lb-muted, #5B6675);
  text-align: right;
}
.lb-hub.is-loading { opacity: .72; pointer-events: none; }

/* ===== Latest strips ===== */
.lb-hub-latest {
  margin: 2.4rem auto 0;
  padding: 0 var(--hub-pad) 2rem;
  max-width: 1200px;
}
.lb-hub-latest__title {
  margin: 0 0 1.2rem;
  font-size: 1.92rem;
  font-weight: 800;
}
.lb-hub-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.lb-hub-latest__col {
  border: 1px solid var(--lb-border, #E2E6EB);
  border-radius: var(--lb-radius, 12px);
  background: #fff;
  padding: 1rem 1.1rem 1.2rem;
}
.lb-hub-latest__col-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: .8rem;
}
.lb-hub-latest__col-hd h3 {
  margin: 0;
  font-size: 1.36rem;
  font-weight: 800;
}
.lb-hub-latest__col-hd a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--lb-primary, #FF6A2B) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.lb-hub-latest__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: 22rem;
  overflow: auto;
}
.lb-hub-latest__list a {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--lb-ink, #1E2A38) !important;
  text-decoration: none !important;
  font-size: 1.28rem;
  font-weight: 500;
}
.lb-hub-latest__list a:hover { color: var(--lb-primary, #FF6A2B) !important; }
.lb-hub-latest__list img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid var(--lb-border, #E2E6EB);
  background: var(--lb-surface-2, #F7F8FA);
}
.lb-hub-latest__empty { color: var(--lb-muted, #5B6675); font-size: 1.28rem; }

@media (max-width: 900px) {
  .lb-hub-latest__grid { grid-template-columns: 1fr; }
  .lb-hub-wide-toolbar { gap: .45rem; }
}
@media (max-width: 640px) {
  .lb-hub .lb-tool-table { min-width: 0; }
  .lb-hub .lb-tool-table thead { display: none; }
  .lb-hub .lb-tool-table,
  .lb-hub .lb-tool-table tbody,
  .lb-hub .lb-tool-table tr,
  .lb-hub .lb-tool-table td { display: block; width: 100%; }
  .lb-hub .lb-tool-table tr {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--lb-border, #E2E6EB);
  }
  .lb-hub .lb-tool-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    border: 0;
  }
  .lb-hub .lb-tool-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--lb-muted, #5B6675);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .03em;
  }
  .lb-hub-rank { width: auto; }
  .lb-hub-wide-vertvtabs { width: 100%; }
  .lb-hub-wide-vertvtabs .lb-hub-chiprow { width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-hub-chip { transition: none; }
}
