/* ── HUB DESIGN SYSTEM ────────────────────────────────────────────────
   Shared component language for the Blog and Plants hub pages so the two
   stay visually and behaviourally identical. Everything is accent-driven:
   set the accent on the .hub wrapper and every component follows.
     .hub          → blue  (blog)
     .hub-plants   → green (plants)
   Paired with assets/hub.js (search + filter + pagination engine).        */

.hub { --hub-accent: var(--blue); --img-bg: var(--bg); }
.hub-plants { --hub-accent: var(--green); }

/* ── Hero meta (blog gains parity with plants) ───────────────────────── */
.hub-hero-meta strong { color: var(--hub-accent); }

/* ── Section heads ───────────────────────────────────────────────────── */
.hub-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.hub-section-name { font-size: 1rem; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.hub-section-sub  { font-size: .84rem; color: var(--muted); }
.hub-result-count { font-size: .82rem; color: var(--muted); min-height: 1.2em; margin-left: auto; }

/* ── Featured (Latest) card ──────────────────────────────────────────── */
.hub-featured {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 44px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.hub-featured:hover { border-color: var(--hub-accent); box-shadow: 0 10px 30px rgba(0,0,0,.28); transform: translateY(-2px); }
.hub-featured:hover .hub-featured-title { color: var(--hub-accent); }
.hub-featured-img {
  width: 100%;
  aspect-ratio: 8/3;
  background: var(--img-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-featured-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hub-featured-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.hub-featured-body .article-meta-tag { align-self: flex-start; width: fit-content; }
.hub-featured-title { font-size: 1.45rem; font-weight: 700; line-height: 1.3; color: var(--text); margin: 0; transition: color .18s; }
.hub-featured-sci { color: var(--muted); font-size: .92rem; line-height: 1.3; margin: 3px 0 0; }
.hub-featured-sci.is-latin { font-style: italic; }
.hub-featured-excerpt { color: var(--muted); font-size: .97rem; line-height: 1.65; margin: 10px 0 0; }
.hub-featured-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; margin-top: auto; }
.hub-featured-cta { color: var(--hub-accent); font-weight: 600; }

/* ── Controls: search first, then compact filter chips ───────────────── */
.hub-controls { margin-bottom: 24px; }
.hub-search { position: relative; display: flex; align-items: center; margin-bottom: 16px; }
.hub-search-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; flex-shrink: 0; }
.hub-search input {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  padding: 12px 42px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.hub-search input::placeholder { color: var(--muted); opacity: .85; }
.hub-search input:hover:not(:focus) { border-color: var(--field-border-hover); }
.hub-search input:focus {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}
.hub-search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 5px;
  font-size: 1.1rem;
  line-height: 1;
  display: none;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.hub-search-clear:hover { color: var(--text); background: var(--border); }

.hub-filters { display: flex; flex-direction: column; gap: 10px; }
.hub-filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-filter-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  width: 78px;
  flex-shrink: 0;
}
.hub-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hub-chip {
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.hub-chip:hover { border-color: var(--hub-accent); color: var(--text); transform: translateY(-1px); }
.hub-chip.active {
  background: color-mix(in srgb, var(--hub-accent) 15%, var(--surface));
  border-color: var(--hub-accent);
  color: var(--hub-accent);
  font-weight: 600;
}
.hub-filter-foot { display: flex; justify-content: flex-end; margin-top: 4px; min-height: 1.2em; }
.hub-clear {
  font-size: .78rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  display: none;
}
.hub-clear:hover { color: var(--text); }

/* ── Grid + cards ────────────────────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  /* Skip layout/paint/decode for off-screen cards in a long grid.
     The intrinsic-size estimate stops the scrollbar jumping; `auto` lets the
     browser remember each card's real size once it has been rendered once. */
  content-visibility: auto;
  contain-intrinsic-size: auto 460px;
}
.hub-card:hover {
  border-color: var(--hub-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  color: inherit;
}
.hub-card:hover .hub-card-title { color: var(--hub-accent); }

/* Contain image (blog: hero SVG shown whole) */
.hub-card-img {
  background: var(--img-bg);
  overflow: hidden;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Cropped thumbnail (plants: left region of the shared 800x340 hero —
   x0-290, y14-306 — so the card shows the plant, not the facts panel). */
.hub-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 290 / 292;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hub-card-thumb img { position: absolute; left: 0; top: -4.79%; width: 275.86%; height: 116.44%; max-width: none; display: block; }

.hub-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.hub-card-body .article-meta-tag { align-self: flex-start; width: fit-content; margin-bottom: 8px; }
.hub-card-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; margin: 0 0 3px; transition: color .18s; }
.hub-card-sci { font-size: .78rem; color: var(--muted); line-height: 1.3; margin: 0 0 9px; }
.hub-card-sci.is-latin { font-style: italic; }
.hub-card-excerpt {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: .75rem; color: var(--muted); }
.hub-card-readtime { display: flex; align-items: center; gap: 5px; }
.hub-card mark { background: color-mix(in srgb, #e6b432 28%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; font-style: normal; } /* token-ok: highlight amber */

/* ── Show more + empty state ─────────────────────────────────────────── */
.hub-more-wrap { text-align: center; margin: 8px 0 56px; }
.hub-more {
  font-size: .88rem;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s;
  display: none;
}
.hub-more:hover { border-color: var(--hub-accent); background: color-mix(in srgb, var(--hub-accent) 6%, var(--surface)); }
.hub-empty { display: none; text-align: center; padding: 52px 24px; color: var(--muted); grid-column: 1 / -1; }
.hub-empty.show { display: block; }
.hub-empty-head { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.hub-empty-sub { margin: 0 0 14px; font-size: .85rem; color: var(--muted); }
.hub-empty-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 20px; }
.hub-empty-pill {
  display: inline-flex; align-items: center;
  font-family: inherit; font-size: .83rem; font-weight: 500;
  padding: 7px 15px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: border-color .15s, background .15s, transform .1s;
}
.hub-empty-pill:hover { border-color: var(--hub-accent); background: color-mix(in srgb, var(--hub-accent) 8%, var(--surface)); transform: translateY(-1px); }
.hub-empty-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 18px; }
.hub-empty-clear {
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: .85rem; color: var(--muted);
  text-decoration: underline; cursor: pointer; transition: color .15s;
}
.hub-empty-clear:hover { color: var(--text); }
.hub-empty-suggest { font-size: .85rem; font-weight: 500; color: var(--hub-accent); text-decoration: none; }
.hub-empty-suggest:hover { text-decoration: underline; }

/* ── Trending / popular (ranked) ─────────────────────────────────────── */
.hub-trending { margin-bottom: 44px; }
.hub-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.hub-trending-item:first-child { padding-top: 4px; }
.hub-trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.hub-trending-item:hover .hub-trending-title { color: var(--hub-accent); }
.hub-trending-rank {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  text-align: right;
  letter-spacing: -.05em;
  user-select: none;
  padding-top: 2px;
}
.hub-trending-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hub-trending-body .article-meta-tag { align-self: flex-start; width: fit-content; }
.hub-trending-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--text); margin: 0; transition: color .18s; }
.hub-trending-excerpt { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: 0; }
.hub-trending-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; }

/* ── Coming soon (unified card grid) ─────────────────────────────────── */
.hub-coming {
  margin-bottom: 44px;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 28%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--hub-accent) 8%, var(--surface));
  padding: 22px 22px 24px;
}
.hub-coming-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--hub-accent) 18%, var(--border));
}
.hub-coming-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hub-accent) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hub-coming-title { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-accent); margin: 0; }
.hub-coming-sub { font-size: .82rem; color: var(--muted); margin: 0; opacity: .8; }
/* auto-fit (not auto-fill) so a few cards fill the row and don't leave phantom
   empty columns; a lone card becomes a full-width featured card (.cs-solo). */
.hub-coming-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.hub-coming-item {
  border: 1px solid color-mix(in srgb, var(--hub-accent) 18%, var(--border));
  border-radius: 10px;
  background: var(--card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.hub-coming-item-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hub-coming-item-img { margin: -14px -16px 4px; height: 118px; background: var(--img-bg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hub-coming-item-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* Single upcoming article → a full-width horizontal featured card */
.hub-coming-grid.cs-solo { grid-template-columns: 1fr; }
.hub-coming-grid.cs-solo .hub-coming-item { flex-direction: row; align-items: stretch; gap: 0; padding: 0; }
.hub-coming-grid.cs-solo .hub-coming-item-img { margin: 0; width: 42%; max-width: 340px; height: auto; min-height: 156px; flex-shrink: 0; }
.hub-coming-grid.cs-solo .hub-coming-item-body { flex: 1; justify-content: center; padding: 18px 20px; gap: 7px; }
.hub-coming-grid.cs-solo .hub-coming-item-title { font-size: 1.05rem; }
@media (max-width: 640px) {
  .hub-coming-grid.cs-solo .hub-coming-item { flex-direction: column; }
  .hub-coming-grid.cs-solo .hub-coming-item-img { width: auto; max-width: none; height: 118px; min-height: 0; margin: 0 0 4px; }
  .hub-coming-grid.cs-solo .hub-coming-item-body { padding: 14px 16px; }
}
.hub-coming-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hub-accent);
  background: color-mix(in srgb, var(--hub-accent) 12%, transparent);
  border-radius: 4px;
  padding: 3px 8px;
  width: fit-content;
}
.hub-coming-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.hub-coming-item-title { font-size: .9rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.3; }
.hub-coming-item-excerpt {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-coming-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--hub-accent) 15%, var(--border));
}
.hub-coming-cta-text { flex: 1 1 200px; font-size: .85rem; color: var(--muted); line-height: 1.5; margin: 0; }
.hub-coming-cta-text strong { color: var(--text); }
.hub-coming-cta-btn {
  background: var(--hub-accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  padding: 9px 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.hub-coming-cta-btn:hover { opacity: .86; }

/* ── Newsletter strip (blog) ─────────────────────────────────────────── */
.hub-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--hub-accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--hub-accent) 25%, var(--border));
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 44px;
}
.hub-newsletter-head { font-size: .97rem; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.hub-newsletter-sub { font-size: .875rem; color: var(--muted); margin: 0; line-height: 1.5; }
.hub-newsletter-btn {
  background: var(--btn-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity .15s;
}
.hub-newsletter-btn:hover { opacity: .85; }

/* Subscribe widget wrapper (blog) */
.hub-sub-wrap { padding-bottom: 48px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media(max-width: 900px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 640px) {
  /* Two columns on mobile: smaller cards + images, more per view (crop unchanged) */
  .hub-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hub-card-body { padding: 12px 12px 14px; }
  .hub-card-body .article-meta-tag { margin-bottom: 6px; }
  .hub-card-title { font-size: .92rem; }
  .hub-card-sci { margin-bottom: 6px; }
  .hub-card-excerpt { -webkit-line-clamp: 2; font-size: .8rem; }
  .hub-badges { gap: 5px; }
  .hub-badge { font-size: .68rem; padding: 2px 7px; }
  .hub-card-meta { margin-top: 10px; }

  .hub-featured-body { padding: 18px 20px 22px; }
  .hub-filter-label { width: 100%; }
  .hub-trending-rank { font-size: 2rem; width: 36px; }
  .hub-coming { padding: 16px 14px 18px; }
  .hub-newsletter { flex-direction: column; align-items: flex-start; gap: 16px; }

  /* Collapse the filter chips behind a "Filters" button */
  .hub-filter-toggle {
    display: inline-flex; align-items: center; gap: 9px; width: 100%; justify-content: center;
    font-family: inherit; font-size: .88rem; font-weight: 600; color: var(--text);
    background: var(--surface); border: 1px solid var(--border2); border-radius: 10px;
    padding: 11px 14px; cursor: pointer; margin-bottom: 18px;
  }
  .hub-filter-toggle svg { width: 16px; height: 16px; color: var(--muted); }
  .hub-filters.hub-filters-standalone { display: none; margin-bottom: 18px; }
  .hub-filters.hub-filters-standalone.open { display: flex; }
}
@media(max-width: 400px) {
  .hub-trending-rank { font-size: 1.6rem; width: 28px; }
}
@media(hover:none)and(pointer:coarse){ input,select,textarea{ font-size:1rem!important } }

/* ══ HUB v2 — sticky controls, sort, active filters, badges, collections ══
   Additive layer. New behaviours are feature-detected in hub.js by element
   presence, so the Blog hub (which omits the new markup) is unaffected apart
   from the shared sticky control bar. */

/* ── Sticky control bar (sits just below the fixed 60px site nav) ─────────── */
.hub-controls {
  position: sticky;
  top: calc(60px + var(--banner-h, 0px));
  z-index: 20;
  margin: 0 0 20px;
  padding: 12px 0;
  /* Opaque background instead of backdrop-blur: near-identical on the dark
     theme but avoids a full-viewport blur repaint on every scroll frame
     (the fixed nav already carries one blur; two stacked cause scroll jank). */
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.hub-controls.stuck { border-bottom-color: var(--border); box-shadow: 0 8px 22px rgba(0,0,0,.28); }

/* compact top row: search + sort side by side (plants) */
.hub-controls-top { display: flex; gap: 12px; align-items: center; }
.hub-controls-top .hub-search { flex: 1 1 auto; margin-bottom: 0; }
.hub-sort { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: .82rem; color: var(--muted); }
.hub-sort label { white-space: nowrap; }
.hub-sort select {
  height: 42px;
  border-radius: var(--field-radius);
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--text);
  font-size: .85rem;
  font-family: inherit;
  padding: 0 30px 0 12px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b949e' stroke-width='1.6'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color .15s;
}
.hub-sort select:focus { border-color: var(--blue); box-shadow: var(--focus-ring); }

/* ── Active-filter summary (removable chips) ─────────────────────────────── */
.hub-active { display: none; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.hub-active.show { display: flex; }
.hub-active-lead { font-size: .78rem; color: var(--faint); }
.hub-active-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .78rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border2);
  border-radius: 20px; padding: 4px 6px 4px 12px;
}
.hub-active-chip button {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 4px; border-radius: 50%; font-family: inherit;
}
.hub-active-chip button:hover { color: var(--text); }
.hub-active-clear {
  font-size: .78rem; color: var(--hub-accent); background: none; border: none;
  cursor: pointer; font-family: inherit; text-decoration: underline; padding: 0;
}

/* filters now sit below the sticky bar as their own block (plants) */
.hub-filters.hub-filters-standalone { margin-bottom: 22px; }

/* Mobile "Filters" toggle (hidden on desktop; filters are always shown there).
   Scoped to a min-width query so it can't override the ≤640 show-rule. */
@media (min-width: 641px) { .hub-filter-toggle { display: none; } } /* bp-ok: complement of 640 */
.hub-filter-toggle-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--hub-accent); color: var(--bg);
  font-size: .72rem; font-weight: 700;
}
.hub-filter-toggle-count:empty { display: none; }

/* ── Scannable card badges (plants) ──────────────────────────────────────── */
.hub-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hub-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 3px 8px; white-space: nowrap;
}
.hub-badge svg { width: 12px; height: 12px; opacity: .8; flex-shrink: 0; }
.hub-badge .hub-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.hub-badge-diff.is-easy { color: #7ee2a0; border-color: var(--green-faint-border); } /* token-ok: lightened --green for legible badge text */
.hub-badge-diff.is-easy .hub-dot { background: var(--green); }
.hub-badge-diff.is-medium { color: #e6c766; border-color: var(--amber-faint-border); } /* token-ok: lightened --amber */
.hub-badge-diff.is-medium .hub-dot { background: var(--amber); }
.hub-badge-diff.is-advanced { color: #f5978f; border-color: var(--red-faint-border); } /* token-ok: lightened --red */
.hub-badge-diff.is-advanced .hub-dot { background: var(--red); }

/* ── Curated collections shelf (plants) ──────────────────────────────────── */
.hub-collections-wrap { position: relative; margin: 0 0 30px; }
.hub-collections {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  padding: 8px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.hub-collection {
  scroll-snap-align: start;
  flex: none; width: 200px; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--card); color: var(--text); font-family: inherit;
  padding: 14px;
  transition: border-color .16s, transform .16s, background .16s;
}
.hub-collection:hover { border-color: var(--hub-accent); transform: translateY(-2px); }
.hub-collection.active { border-color: var(--hub-accent); background: color-mix(in srgb, var(--hub-accent) 10%, var(--card)); }
.hub-collection-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 9px; background: var(--surface-2); color: var(--hub-accent); }
.hub-collection-ico svg { width: 17px; height: 17px; }
.hub-collection h3 { font-size: .92rem; font-weight: 700; margin: 0 0 3px; color: var(--text); }
.hub-collection p { font-size: .78rem; color: var(--muted); margin: 0; }
/* scroll affordance: edge fades + nudging chevron signal "more this way" */
.hub-collections-wrap::before, .hub-collections-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 46px;
  pointer-events: none; z-index: 3; opacity: 0; transition: opacity .22s;
}
.hub-collections-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg) 18%, transparent); }
.hub-collections-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg) 18%, transparent); }
.hub-collections-wrap.more-left::before { opacity: 1; }
.hub-collections-wrap.more-right::after { opacity: 1; }
.hub-collections-hint {
  position: absolute; right: 8px; top: 50%; transform: translate(0,-50%);
  z-index: 4; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border2);
  display: grid; place-items: center; color: var(--text);
  pointer-events: none; opacity: 0; transition: opacity .22s, background .15s, border-color .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
  cursor: pointer; padding: 0; font: inherit;
}
.hub-collections-hint svg { width: 16px; height: 16px; }
.hub-collections-hint:hover { background: var(--surface-2); border-color: var(--hub-accent); color: var(--hub-accent); }
/* only clickable while there is more to reveal */
.hub-collections-wrap.more-right .hub-collections-hint { opacity: 1; pointer-events: auto; animation: hub-nudge 1.5s ease-in-out infinite; }
@keyframes hub-nudge { 0%,100% { transform: translate(0,-50%); } 50% { transform: translate(4px,-50%); } }

/* ── Browse-first layout: discovery zone below the grid ──────────────────── */
/* .hub-browse simply wraps the controls + grid so the sticky control bar
   releases at the end of the grid instead of hovering over the discovery
   sections below it. */
.hub-discovery { margin-top: 12px; padding-top: 40px; border-top: 1px solid var(--border); }
/* Popular/Editor's picks reuse the .hub-card component (with .hub-grid layout),
   so they match the main grid. The picks row never grows past 3. */
.hub-picks { margin-bottom: 40px; }
/* Coming soon — a light chip strip instead of the old heavy panel */
.hub-soon { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 8px; }
.hub-soon-label { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--hub-accent); flex-shrink: 0; }
.hub-soon-label svg { width: 16px; height: 16px; }
.hub-soon-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hub-soon-chip { font-size: .82rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 5px 13px; white-space: nowrap; }
.hub-soon-more { font-size: .8rem; color: var(--faint); }

/* ── Grid reveal motion (opt-in via data-animate; JS adds .hub-anim) ──────── */
.hub-grid.hub-anim .hub-card { opacity: 0; transform: translateY(10px); }
.hub-grid.hub-anim .hub-card.hub-in { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }

@media (prefers-reduced-motion: reduce) {
  .hub-collections-wrap.more-right .hub-collections-hint { animation: none; }
  .hub-grid.hub-anim .hub-card { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .hub-controls-top { flex-wrap: wrap; }
  .hub-sort { width: 100%; justify-content: space-between; }
  .hub-sort select { flex: 1; }
  .hub-collection { width: 172px; }
}
