/* Filter lives in the top banner: a button showing the current selection, opening a panel */
.nfilter { position: relative; margin-left: auto; }
.nfilter__btn { display: inline-flex; align-items: center; gap: 9px; font-family: inherit; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 99px; padding: 6px 10px 6px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.nfilter__btn:hover { background: rgba(255,255,255,.14); }
.nfilter__btn svg { color: var(--accent); flex: none; }
.nfilter.is-filtered .nfilter__btn { border-color: var(--sel); background: rgba(201,150,20,.22); }
.nfilter__state { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nfilter__n { font-size: 11px; font-weight: 700; color: var(--text-d2); background: rgba(255,255,255,.1); border-radius: 99px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.nfilter__chev { width: 6px; height: 6px; border-right: 2px solid var(--text-d2); border-bottom: 2px solid var(--text-d2); transform: translateY(-2px) rotate(45deg); margin: 0 3px 0 1px; transition: transform .25s; }
.nfilter.open .nfilter__chev { transform: translateY(1px) rotate(225deg); }

.nfilter__panel { position: absolute; top: calc(100% + 14px); right: 0; width: min(540px, calc(100vw - 24px)); background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(11,26,43,.45); padding: 16px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: .25s cubic-bezier(.2,.8,.2,1); }
.nfilter.open .nfilter__panel { opacity: 1; transform: none; pointer-events: auto; }
.nfilter__hd { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.nfilter__hd b { font-size: 14px; }
.nfilter__hd span { font-size: 12px; color: var(--text-3); }
.nfilter__ft { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* chip options */
.fgrp + .fgrp { margin-top: 14px; }
.fgrp__cap { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.fgrp__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fopt { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.fopt:hover { border-color: var(--line-2); color: var(--text); background: #fff; }
.fopt.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.fopt--line { padding: 3px; border-radius: 9px; line-height: 0; }
.fopt--line .lineTag { height: 22px; font-size: 11px; border-radius: 6px; }
.fopt--line:not(.is-on) .lineTag { opacity: .9; }
.fopt--line.is-on { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.fopt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sfilter__n { font-size: 12.5px; color: var(--text-2); }
.sfilter__n b { color: var(--text); font-size: 14px; }
.sfilter__reset { font-family: inherit; border: 1px solid var(--line-2); background: transparent; border-radius: 9px; padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.sfilter__reset:hover { border-color: var(--neg); color: var(--neg); }
.nfilter:not(.is-filtered) .sfilter__reset { visibility: hidden; }

@media (max-width: 720px) {
  .nav.is-on .nav__brand, .nav.is-on .nav__demo { display: none; }   /* phones: logo + filter only once the banner shows */
  .nfilter__state { max-width: 150px; }
  .nfilter { transform: none; }   /* a transform would trap the fixed panel */
  .nfilter__panel { position: fixed; top: 80px; left: 12px; right: 12px; width: auto; }
}
