/* Finding things and choosing what you see: search (the page and the top bar's box),
   suggestions while typing, hashtags, saved posts, infinite lists' ends, Settings →
   Content you see, the block confirmation, embeds' code, and the moderators' review of
   new accounts. */

/* ─── Infinite lists ─────────────────────────────────────────────────────── */

/* Once the script loads pages by itself, the link to the next page is only for it. */
.is-infinite > [data-next] { display: none; }
.list-more { display: flex; justify-content: center; padding: 1rem; }
.list-end { display: flex; min-height: 1px; justify-content: center; padding: 0.5rem 0; }
.list-end.is-loading { padding: 1.25rem 0; }
.list-end.is-loading::after {
  content: '';
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink-2);
  animation: bt-spin 0.8s linear infinite;
}
@keyframes bt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .list-end.is-loading::after { animation-duration: 2.4s; } }
.list-error { font-size: 0.875rem; color: var(--muted); }
.list-newer { margin-bottom: 0.75rem; }

/* ─── The top bar's search box ───────────────────────────────────────────── */

.topbar-search { position: relative; display: none; margin-left: auto; align-items: center; }
.topbar-search-icon { pointer-events: none; position: absolute; left: 0.75rem; color: var(--muted); }
.topbar-search-input {
  height: 2.25rem;
  width: 12rem;
  border-radius: 9999px;
  background: var(--surface);
  padding: 0 0.875rem 0 2.125rem;
  font-size: 0.875rem;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
  transition: width 0.2s, box-shadow 0.15s;
}
.topbar-search-input::placeholder { color: var(--muted); }
.topbar-search-input:focus { width: 17rem; box-shadow: inset 0 0 0 2px var(--focus); }
.topbar-search-input::-webkit-search-cancel-button { display: none; }
@media (min-width: 960px) {
  .topbar-search { display: flex; }
  .topbar-search + .topbar-actions { margin-left: 0.5rem; }
  .topbar-search-link { display: none; }
}
@media (prefers-reduced-motion: reduce) { .topbar-search-input { transition: none; } }
/* Phones: the bar keeps to the screen. "You" is in the bottom bar. */
@media (max-width: 39.99rem) { .topbar-profile { display: none; } }

/* ─── Suggestions (people, #tags, searches) ──────────────────────────────── */

.ac-list {
  position: fixed;
  z-index: 70;
  max-height: min(20rem, 50dvh);
  overflow-y: auto;
  border-radius: 0.875rem;
  background: var(--surface);
  padding: 0.25rem;
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--line);
}
.ac-list[hidden] { display: none; }
.ac-item { display: flex; align-items: center; gap: 0.625rem; border-radius: 0.625rem; padding: 0.5rem 0.625rem; cursor: pointer; }
.ac-item:has(> .ac-link) { padding: 0; }
.ac-link { display: flex; flex: 1; min-width: 0; align-items: center; gap: 0.625rem; padding: 0.5rem 0.625rem; color: inherit; }
.ac-item.is-active, .ac-item:hover { background: var(--surface-2); }
.ac-who { display: flex; min-width: 0; flex-direction: column; }
.ac-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.ac-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; color: var(--muted); }
.ac-tag { font-weight: 600; color: var(--ink); }
.ac-count { margin-left: auto; flex-shrink: 0; font-size: 0.75rem; color: var(--muted); }
.ac-search { font-weight: 500; color: var(--ink); }
.ac-recent { color: var(--ink-2); }

/* ─── The search page ────────────────────────────────────────────────────── */

.search-box { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.search-box-icon { pointer-events: none; position: absolute; left: 0.9375rem; color: var(--muted); }
.search-input { flex: 1; min-width: 0; border-radius: 9999px; padding-left: 2.75rem; font-size: 1rem; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-go { flex-shrink: 0; height: 2.75rem; }
.search-tabs { margin-top: 1rem; display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); }
.search-tab {
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.search-tab:hover { color: var(--ink); }
.search-tab.is-selected { border-bottom-color: var(--ink); color: var(--ink); }
.search-controls { margin: 0.75rem 0 1rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 0.75rem; }
.search-sort { display: inline-flex; align-items: center; gap: 0.5rem; }
.search-label { font-size: 0.8125rem; color: var(--muted); }
.search-page select.control, .settings select.mute-duration { appearance: auto; -webkit-appearance: menulist; padding-right: 0.5rem; }
.control-sm, input.control-sm, select.control-sm { height: 2.125rem; border-radius: 0.625rem; padding: 0 0.625rem; font-size: 0.875rem; }
.search-filters { flex: 1 1 auto; }
.search-filters > summary { list-style: none; display: inline-flex; gap: 0.375rem; }
.search-filters > summary::-webkit-details-marker { display: none; }
.search-filters[open] > summary { background: var(--surface-2); color: var(--ink); }
.search-filters-count {
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--ink);
  padding: 0 0.3125rem;
  font-size: 0.6875rem;
  color: var(--page);
}
.search-filters-panel {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  border-radius: 1rem;
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 0 0 1px var(--line);
}
.search-field { display: flex; min-width: 0; flex-direction: column; gap: 0.25rem; }
.search-checks, .search-filters-actions, .search-tips { grid-column: 1 / -1; }
.search-checks { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; }
.search-filters-actions { display: flex; gap: 0.5rem; }
.search-tips { font-size: 0.75rem; line-height: 1.7; color: var(--muted); }
.search-tips code { border-radius: 0.25rem; background: var(--surface-2); padding: 0 0.25rem; font-size: 0.75rem; color: var(--ink-2); }
.search-start .section-title { margin-top: 1.5rem; }
.search-recent-list { display: flex; flex-direction: column; }
.search-recent-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; border-radius: 0.625rem; padding: 0.25rem 0.25rem 0.25rem 0.75rem; }
.search-recent-item:hover { background: var(--surface-2); }
.search-recent-item > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.search-recent-clear { margin: 0.5rem 0.75rem 0; font-size: 0.8125rem; }
.search-people > .person { padding: 0; }
.search-people .person-link { flex: 1; min-width: 0; padding: 0.75rem 1rem; }
.search-people .person-meta { margin-left: auto; padding-left: 0.5rem; text-align: right; }
.person-bio {
  margin-top: 0.125rem;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-2);
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ─── Hashtags ───────────────────────────────────────────────────────────── */

.tag-strip { margin: 0.75rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-chip { padding: 0.375rem 0.75rem; font-size: 0.875rem; transition: background-color 0.15s, color 0.15s; }
.tag-chip:hover { background: var(--surface-3); color: var(--ink); }
.tag-chip-count { margin-left: 0.375rem; font-weight: 400; color: var(--muted); }
.tag-head { margin-bottom: 1rem; }
.tag-hash { margin-right: 0.0625rem; color: var(--muted); }
.tag-stats { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); }
.tag-stats a { color: var(--link); }
.tag-stats a:hover { text-decoration: underline; }

/* ─── Settings → Content you see; blocking ───────────────────────────────── */

.mute-word-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mute-word-row > input { flex: 1 1 14rem; }
.mute-word-row > select { flex: 0 1 12rem; height: 2.75rem; }
.muted-list { margin-top: 0.75rem; display: flex; flex-direction: column; }
.muted-list > li { display: flex; align-items: center; gap: 0.75rem; border-top: 1px solid var(--line); padding: 0.5rem 0; }
.muted-word { font-weight: 600; color: var(--ink); }
.muted-until { flex: 1; font-size: 0.8125rem; color: var(--muted); }
.muted-people { margin-top: 0.75rem; }
.muted-people > .person { padding: 0 0.75rem 0 0; }
.muted-people .person-link { flex: 1; min-width: 0; }
.muted-empty { margin-top: 0.75rem; }
.choice.is-disabled { opacity: 0.6; }
.block-effects { margin: 1rem 0 1.5rem; padding-left: 1.25rem; list-style: disc; line-height: 1.6; color: var(--ink-2); }
.block-effects li + li { margin-top: 0.375rem; }
.profile-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.375rem; }
.profile-action .profile-message { margin-left: 0; }
.profile-menu > summary { list-style: none; }
.profile-menu > summary::-webkit-details-marker { display: none; }

/* Hidden from people; bots fill every field. */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ─── Embeds' code ───────────────────────────────────────────────────────── */

.embed-code { min-height: 6rem; padding: 0.75rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; line-height: 1.5; resize: vertical; }
.embed-preview { margin-top: 0.75rem; display: block; width: 100%; max-width: 550px; height: 420px; border: 0; border-radius: 1rem; background: var(--surface-2); }
.embed-dialog .dialog-inner { width: min(40rem, calc(100vw - 2rem)); }

/* ─── Moderators: new accounts to review ─────────────────────────────────── */

.mod-signals { margin: 0.5rem 0; padding-left: 1.25rem; list-style: disc; font-size: 0.875rem; color: var(--ink-2); }
.mod-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ─── Trending: a sidebar beside the column on wide screens, a strip in it otherwise ── */

.page-aside { display: none; }
.trends-strip {
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-right: 2rem;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
}
.trends-strip::-webkit-scrollbar { display: none; }
.trends-strip .tag-chip { flex-shrink: 0; white-space: nowrap; }
.trends-strip-label { display: inline-flex; flex-shrink: 0; align-items: center; gap: 0.25rem; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }

.trends-card { padding: 0.5rem 0; }
.trends-title { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.trends-title .icon { color: var(--muted); }
.trends-list { display: flex; flex-direction: column; }
.trend { display: flex; flex-direction: column; gap: 0.0625rem; padding: 0.5rem 1rem; color: var(--ink); text-decoration: none; transition: background-color 0.15s; }
.trend:hover { background: var(--surface-2); }
.trend:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.trend-name { font-weight: 600; overflow-wrap: anywhere; }
.trend-count { font-size: 0.8125rem; color: var(--muted); }
.trends-more { display: block; padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--link); text-decoration: none; }
.trends-more:hover { text-decoration: underline; }

/* The column and the sidebar share the top bar's frame: the column under the logo, the
   sidebar under the bar's right end. */
@media (min-width: 64rem) {
  .with-aside {
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 42rem) 17rem;
    justify-content: space-between;
    align-items: start;
    max-width: 64rem;
    padding: 0 1rem;
  }
  .with-aside > .page { margin: 0; padding-left: 0; padding-right: 0; }
  .with-aside > .page-aside { position: sticky; top: 4.75rem; display: block; margin-top: 1.25rem; }
  .with-aside .trends-strip { display: none; }
}
/* Without trends there's no sidebar: the column stays in the middle. */
@media (min-width: 64rem) {
  .with-aside:not(:has(> .page-aside)) { display: block; max-width: none; padding: 0; }
  .with-aside:not(:has(> .page-aside)) > .page { margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
}
.trends-scope { padding: 0.625rem 1rem 0.125rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.trends-scope + .trends-list { margin-top: 0; }
.trends-strip-scope { flex-shrink: 0; margin-left: 0.25rem; padding-left: 0.625rem; border-left: 1px solid var(--line); font-size: 0.75rem; font-weight: 600; color: var(--muted); }

/* ─── Who to follow: the feed's card, /people ────────────────────────────────── */

.follow-card { padding: 0.25rem 0 0.5rem; }
.follow-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 1rem 0.25rem; }
.follow-card-title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.follow-card-title .icon { color: var(--muted); }
.follow-card-hide { font-size: 0.875rem; color: var(--muted); }
.follow-card-hide:hover { color: var(--ink); }
.follow-card .suggest-list { margin-top: 0; border: 0; border-radius: 0; background: none; }
.suggest-follow:has(+ .suggest-dismiss) { padding-right: 0; }
.suggest-dismiss { flex-shrink: 0; margin-right: -0.25rem; color: var(--muted); }
.settings-subhead { margin-top: 1.25rem; font-size: 0.9375rem; font-weight: 600; }
.settings-section > h2 + .settings-subhead { margin-top: 0.75rem; }
.follow-card-hide { text-decoration: none; }
/* The card's rows line up with its heading. */
.follow-card .person { padding-left: 0; }
