/* The filter line over a list (listfilter.js; docs/design-proposals/
   web-filter.md, option A). Only the inbox's own tokens: --glass, --text,
   --text-2, --border, --surface, --hover, --selected, --selected-text,
   --primary, --on-primary, --ui, the labels' --lb-* and the numbers'
   --nf-*. Pills are 36 px with 44 px to tap; the icon and the actions 44. */
.fl-host { flex: 1 1 100%; min-width: 0; width: 100%; }
.fl { position: relative; width: 100%; font-family: var(--ui); }
.fl-line { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.fl-left { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.fl-rest { font: 500 14px var(--ui); color: var(--text-2); padding-left: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.fl-pills { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; align-items: center;
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); padding: 4px 24px 4px 0; }
.fl-pills::-webkit-scrollbar { display: none; }
.fl-pills.fits { mask-image: none; padding-right: 0; }
/* A pill: 36 px tall, 44 px to tap (the ::after reaches the row gap). */
.fl-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px;
  padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass);
  color: var(--text); font: 500 13px var(--ui); white-space: nowrap; cursor: pointer; }
.fl-pill::after { content: ""; position: absolute; inset: -4px 0; }
.fl-pill:hover { background: var(--hover); }
.fl-pill svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
/* Chosen: tinted, outlined in the accent, bold and ticked, in both themes. */
.fl-pill[aria-pressed="true"], .fl-pill.chosen {
  background: var(--selected); color: var(--selected-text); border-color: var(--primary); font-weight: 600; }
.fl-pill .fl-n { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.fl-pill.chosen { padding-right: 6px; }
.fl-word { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.fl-x { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.fl-x svg { width: 16px; height: 16px; }
.fl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mark); flex: none; }
.fl svg.fl-ph { width: 15px; height: 15px; fill: var(--mark); }
.fl-clear { flex: none; border: 0; background: none; color: var(--primary); font: 600 13px var(--ui);
  min-height: 44px; padding: 0 6px; cursor: pointer; white-space: nowrap; }
/* The filter icon: 44 px round, lit while open or with something chosen. */
.fl-btn { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent;
  background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.fl-btn:hover { background: var(--hover); }
.fl-btn svg { width: 22px; height: 22px; fill: currentColor; }
.fl-btn.lit { background: var(--selected); color: var(--selected-text); border-color: var(--primary); }
.fl-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--primary); color: var(--on-primary); font: 700 11px/18px var(--ui); text-align: center; }
/* Open in place: the line becomes the panel's head and the groups push the list down. */
.fl-head { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
.fl-title { flex: 1 1 auto; font: 600 17px var(--ui); color: var(--text); padding-left: 4px; }
.fl-act { border: 0; background: none; color: var(--primary); font: 600 14px var(--ui); min-height: 44px; min-width: 44px;
  padding: 0 10px; cursor: pointer; border-radius: 10px; }
.fl-act:hover:not([disabled]) { background: var(--hover); }
.fl-act[disabled] { color: var(--text-2); cursor: default; }
.fl-panel { padding: 2px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.fl-gt { font: 600 11px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 12px 0 8px 4px; }
.fl-gp { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.fl :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .fl-panel { animation: fl-in 200ms ease-out; }
}
@keyframes fl-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Messages: the line takes the lenses' place in the list's head. */
#list .list-head .fl-host { margin-top: -4px; }
body.noting #list .list-head .fl-host { display: none; }
