/* Verbatim <style> block from design/explore.html. Do not edit by hand; re-extract instead. */
.explore-main { padding-block: var(--sp-8) var(--sp-16); }
.explore-head { margin-bottom: var(--sp-6); }
.xsec, .cat-nav, #topic-results { min-width: 0; }
.explore-search { margin-top: var(--sp-4); max-width: 560px; }
.explore-search .input { height: 40px; font-size: var(--fs-14); }
.explore-search__clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-control); background: transparent; color: var(--muted);
  display: grid; place-items: center;
}
.search-status { margin-top: var(--sp-2); font-size: var(--fs-13); color: var(--muted); min-height: 1.5em; }

.xsec { margin-top: var(--sp-8); }
.xsec:first-child { margin-top: 0; }
.xsec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.xsec__title { font-size: var(--fs-16); font-weight: var(--fw-semibold); }
.xsec__meta { font-size: var(--fs-13); color: var(--muted); }

/* Trending topics strip */
.trend-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-2); }
.trend-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "rank body delta" "rank spark spark";
  align-items: center; gap: var(--sp-2) var(--sp-3); height: 100%;
  padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  text-decoration: none; color: var(--text);
}
.trend-tile__rank { grid-area: rank; align-self: start; font-family: var(--font-mono); font-size: var(--fs-13); color: var(--muted); min-width: 16px; padding-top: 2px; }
.trend-tile__body { grid-area: body; min-width: 0; display: grid; }
.trend-tile__name { font-size: var(--fs-14); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-tile__meta { font-size: var(--fs-12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-tile__delta { grid-area: delta; align-self: start; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-14); font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: 2px; }
.trend-tile__spark { grid-area: spark; min-width: 0; }
.trend-tile__spark .sparkline { width: 100%; height: 28px; }

/* Category controls */
.cat-nav { margin-bottom: var(--sp-4); }
.tab-count { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); font-weight: var(--fw-regular); }
/* The chip row is its own scroll container: contain:inline-size keeps its chips out of the
   page's intrinsic width, so the document never grows wider than the viewport. */
.cat-chips {
  --od-rail-pad: var(--sp-4); margin-inline: calc(-1 * var(--sp-4)); padding-block: 2px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; contain: inline-size;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .chip { height: 36px; }
.cat-chips .chip::after { content: ""; position: absolute; inset: -4px 0; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
.cat-section { margin-top: var(--sp-8); scroll-margin-top: calc(64px + var(--sp-4)); }
.cat-section:first-child { margin-top: 0; }
.cat-section__desc { font-size: var(--fs-13); color: var(--muted); }
#topics, .xsec { scroll-margin-top: calc(64px + var(--sp-4)); }

.no-match__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-2); }

/* Loading skeleton */
.topic-skel { display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.topic-skel__head { display: flex; justify-content: space-between; gap: var(--sp-3); }

@media (max-width: 767.98px) {
  .explore-search { max-width: none; }
  .explore-search .input { height: 44px; font-size: var(--fs-16); }
  .explore-search__clear { width: 40px; height: 40px; right: 2px; }
  .explore-main { padding-block: var(--sp-6) var(--sp-12); }
  .trend-strip { display: flex; overflow-x: auto; overscroll-behavior-x: contain; contain: inline-size; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: calc(-1 * var(--sp-4)); padding-inline: var(--sp-4); scroll-padding-inline: var(--sp-4); }
  .trend-strip::-webkit-scrollbar { display: none; }
  .trend-strip > li { flex: none; width: 248px; scroll-snap-align: start; }
  .trend-strip > li:last-child { margin-inline-end: var(--sp-4); }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: hover) {
  .trend-tile:hover { border-color: var(--border-strong); }
  .trend-tile:hover .trend-tile__name { text-decoration: underline; text-underline-offset: 3px; }
  .explore-search__clear:hover { background: var(--hover); color: var(--text); }
}
