/* Landing search bar (build/pages/landing-search.mjs): the 44px field and its shortcuts; the list's styles load with the module
   (landing-search-results.css). A clear 16px sits between the bar and the h1 at every width. */
.home-search { position: relative; z-index: 900; inline-size: 100%; max-inline-size: var(--container); margin: calc(-1 * var(--space-2)) auto 0; padding-inline: var(--gutter); }
.home-search ~ .page-head { padding-block: var(--space-4) var(--space-3); }
@media (min-width: 1080px) {
  .home-search { margin-block-start: calc(-1 * var(--space-3)); }
  .home-search ~ .page-head { padding-block: var(--space-4) var(--space-3); }
}

/* Below 860px the landing uses these section chips in place of the desktop links. On phones the chips occupy the
   heading's spare space. The field is the results list's containing block. */
.home-search__row { position: relative; display: flex; gap: var(--space-2); }
.home-search__field { position: relative; flex: 1 1 auto; min-inline-size: 0; }
@media (max-width: 479.98px) {
  .home-search__sections { position: absolute; inset-block-start: calc(100% + var(--space-4)); inset-inline-end: 0; }
  .home-search { margin-block-start: -12px; }
  .home-search ~ .page-head { padding-block-end: var(--space-1); }
  .home-search ~ .page-head .page-head__title { padding-inline-end: 9rem; }
}
@media (max-width: 359.98px) {
  .home-search ~ .page-head { padding-block-end: 2px; }
  .home-search ~ .page-head .page-head__title { padding-inline-end: 6rem; font-size: 1.75rem; }
}
.home-search__sections { display: flex; flex: none; gap: var(--space-1); margin-inline-start: auto; }
/* A compact 44px chip: the line icon over a short label (a phone tab bar's proportions), Seam frame like the field. */
.home-search__chip { display: inline-grid; justify-items: center; align-content: center; gap: 2px; min-inline-size: var(--tap); block-size: var(--tap); padding-inline: 6px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-muted); font: 600 0.75rem/1.1 var(--font-body); white-space: nowrap; text-decoration: none; transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.home-search__chip > .line-icon { inline-size: 18px; block-size: 18px; color: var(--primary); }
.home-search__chip:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.home-search__chip[aria-current="page"] { border-color: var(--border-strong); color: var(--text); }
.home-search__chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The narrowest phones (below 360px): a 12px label would squeeze the field under 160px in the long locales
   (Communauté, Comunidade, Сообщество), and a smaller one is unreadable, so the chips go icon-only (owner ruling,
   final gate 2; landing contract exception). Still 44x44, named by aria-label (the label stays in the DOM, visually
   hidden), with a title tooltip and the focus ring above. */
@media (max-width: 359.98px) {
  .home-search__row { gap: 6px; }
  .home-search__sections { gap: 2px; }
  .home-search__chip { inline-size: var(--tap); padding: 0; }
  .home-search__chip > .line-icon { inline-size: 20px; block-size: 20px; }
  .home-search__chip > span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 860px) { .home-search__sections { display: none; } }
@media (prefers-reduced-motion: reduce) { .home-search__chip { transition: none; } }

.home-search__icon { position: absolute; inset-block-start: 13px; inset-inline-start: 14px; inline-size: 18px; block-size: 18px; fill: none; stroke: var(--text-faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.home-search__input { display: block; inline-size: 100%; block-size: var(--tap); margin: 0; padding-inline: 42px var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); font: 400 var(--step-0)/1.2 var(--font-body); text-overflow: ellipsis; appearance: none; transition: border-color var(--dur-fast) var(--ease); }
.home-search__input::placeholder { color: var(--text-faint); opacity: 1; }
.home-search__input::-webkit-search-cancel-button, .home-search__input::-webkit-search-decoration { appearance: none; }
.home-search__input:hover, .home-search__input:focus { border-color: var(--primary); }
.home-search__input:focus { outline: none; }
.home-search__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .home-search__input { transition: none; } }
