/* freelancers.html · a real browse tool: sticky filter rail (a bottom sheet on phones) beside a grid of 18 sample
   FreelancerCards that filter and sort with FLIP. White base, category colour on chips and photo rings. */

.flh { padding: 112px 0 22px; background: linear-gradient(180deg, #fff6e8 0%, #fff 100%); }
.flh__in { display: grid; gap: 14px 48px; align-items: end; }
.flh__title { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5vw, 72px); line-height: .96; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.flh__title em { font-style: normal; color: var(--orange); }
.flh__lead { max-width: 30em; font-size: 17px; color: var(--text); }
.flh__sample { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.flh__sample span { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
@media (min-width: 960px) { .flh__in { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .flh { padding-top: 108px; } }

.br { padding: 10px 0 clamp(72px, 8vw, 120px); }
.br__in { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .br__in { grid-template-columns: 272px minmax(0, 1fr); } }
@media (min-width: 1200px) { .br__in { grid-template-columns: 292px minmax(0, 1fr); } }

/* ═══ rail ═══ */
.rail { display: flex; flex-direction: column; background: #fff; }
.rail__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rail__title { font-family: var(--display); font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.rail__x { display: none; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; }
.rail__x svg { width: 20px; height: 20px; }
.rail__body { display: grid; gap: 16px; margin-top: 12px; }
.rail__search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.rail__search:focus-within { box-shadow: inset 0 0 0 2px var(--orange-text); }
.rail__search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.rail__search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.rail__grp { margin: 0; padding: 0; border: 0; min-width: 0; }
.rail__grp legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rail__hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cats { display: flex; flex-wrap: wrap; gap: 5px; }
.cat { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px 4px 8px; border: 0; border-radius: 999px; background: var(--cs, var(--paper)); color: var(--cd, var(--ink)); font-weight: 700; font-size: 12.5px; line-height: 1.15; cursor: pointer; text-align: start; transition: background-color .2s, color .2s, transform .3s var(--spring); }
.cat i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); transition: background-color .2s; }
.cat:hover { transform: translateY(-1px); }
.cat:active { transform: scale(.95); }
.cat[aria-pressed="true"] { background: var(--cd, var(--ink)); color: #fff; }
.cat[aria-pressed="true"] i { background: #fff; }
.cat.is-all { padding-inline: 12px; }
.lvls { display: flex; flex-wrap: wrap; gap: 5px; }
.lvls button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 700; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.lvls b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); font-size: 11px; color: var(--ink); }
.lvls button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }

/* dual range */
.rng__val { font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rng { position: relative; height: 32px; margin-top: 2px; }
.rng__track { position: absolute; left: 11px; right: 11px; top: 14px; height: 4px; border-radius: 2px; background: var(--paper-2); }
.rng__track i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--orange); }
.rng input { position: absolute; inset: 0; width: 100%; height: 32px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rng input::-webkit-slider-runnable-track { background: none; height: 32px; }
.rng input::-moz-range-track { background: none; }
.rng input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 4px 10px -4px rgba(3, 21, 20, .5); cursor: grab; }
.rng input::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink); cursor: grab; }
.rng input:focus-visible { outline: none; }
.rng input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px rgba(0, 174, 169, .45); }
.rail__foot { display: flex; gap: 8px; margin-top: 18px; }
.rail__done { display: none; gap: .3em; }

@media (min-width: 960px) {
  .rail { position: sticky; top: 92px; max-height: calc(100vh - 108px); padding: 18px 18px 16px; border-radius: 24px; box-shadow: var(--shadow-s), inset 0 0 0 1px rgba(3, 21, 20, .05); }
  .rail__body { overflow-y: auto; overscroll-behavior: contain; padding: 2px; margin-inline: -2px; scrollbar-width: thin; }
  .res__filters { display: none !important; }
}
/* phone/tablet: the rail is a bottom sheet */
@media (max-width: 959px) {
  .rail { position: fixed; z-index: 60; inset: auto 0 0 0; max-height: 86vh; padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-l); transform: translateY(105%); visibility: hidden; transition: transform .5s var(--spring), visibility 0s .5s; }
  .rail.is-open { transform: none; visibility: visible; transition: transform .5s var(--spring), visibility 0s; }
  .rail__body { overflow-y: auto; overscroll-behavior: contain; }
  .rail__x { display: grid; }
  .rail__done { display: inline-flex; flex: 1; }
  .br__scrim { position: fixed; inset: 0; z-index: 59; background: rgba(3, 21, 20, .42); animation: fl-fade .3s ease; }
  @keyframes fl-fade { from { opacity: 0; } }
}

/* ═══ results ═══ */
.res__bar { position: sticky; top: 84px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; padding: 8px 0; background: linear-gradient(#fff 80%, rgba(255, 255, 255, 0)); }
@media (min-width: 960px) { .res__bar { position: static; padding: 0; background: none; } }
.res__filters svg { width: 18px; height: 18px; }
.res__n { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); font-size: 12px; color: var(--ink); }
.res__count { flex: 1; font-weight: 700; font-size: 14px; color: var(--muted); }
.res__sort { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--muted); }
.res__sort .inp { min-height: 42px; width: auto; padding: 8px 40px 8px 14px; font-size: 15px; font-weight: 700; }
@media (max-width: 599px) { .res__sort span { display: none; } .res__count { order: 3; flex-basis: 100%; } }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1360px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fc { position: relative; will-change: transform; }
.fc[hidden] { display: none; }
.fc.is-in { animation: fc-in .5s var(--spring) both; animation-delay: calc(var(--d, 0) * 30ms); }
@keyframes fc-in { from { opacity: 0; transform: scale(.86) translateY(14px); } }
.fc__a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 8px 8px 12px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-s), inset 0 0 0 1px rgba(3, 21, 20, .05); text-decoration: none; color: inherit; transition: box-shadow .3s, transform .45s var(--spring); }
.fc__a:hover { box-shadow: var(--shadow-l), inset 0 0 0 1px rgba(3, 21, 20, .05); transform: translateY(-4px); }
.fc__face { position: relative; display: block; margin-bottom: 4px; }
.fc__ph { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--cs); aspect-ratio: 5 / 4; box-shadow: inset 0 -4px 0 var(--c); }
.fc__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .8s var(--spring); }
.fc__a:hover .fc__ph img { transform: scale(1.05); }
/* PRO hangs off the photo's bottom edge, centred (ProBadge); the gap under the photo absorbs its 8px */
/* the level coin punches the photo's trailing bottom corner; it moves to the top when PRO owns the bottom edge (FreelancerCard) */
.fc__lv { position: absolute; inset-inline-end: 8px; bottom: -8px; z-index: 2; width: 32px; height: 32px; }
.fc__lv.is-top { top: 8px; bottom: auto; }
.fc__chip { align-self: flex-start; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: var(--cs); color: var(--cd); font-weight: 700; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-inline: 4px; }
.fc__n { display: flex; align-items: center; gap: 5px; margin-inline: 4px; font-weight: 700; font-size: 18px; color: var(--ink); }
.fc__vf { width: 16px; height: 16px; }
.fc__t { margin-inline: 4px; font-size: 14px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc__sk { display: flex; flex-wrap: wrap; gap: 4px; margin-inline: 4px; }
.fc__sk li { max-width: 100%; padding: 3px 8px; border-radius: 999px; background: var(--paper); font-weight: 700; font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc__sk .fc__more { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.fc__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin: auto 4px 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.fc__price b { font-size: 15.5px; color: var(--ink); }
.fc__price small { font-size: 12px; }
.fc__rate { display: inline-flex; align-items: center; gap: 3px; }
.fc__rate svg { width: 14px; height: 14px; color: var(--orange); }
.fc__rate b { color: var(--ink); }
.fc__act { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; color: var(--muted); }
.fc__act i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.fc__act.is-today i { background: var(--cat-admin); box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: fl-ping 2s ease-out infinite; }
@keyframes fl-ping { 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@media (max-width: 599px) {
  .fc__n { font-size: 16px; }
  .fc__t { font-size: 13px; }
}

/* empty state */
.empty { display: grid; justify-items: center; gap: 14px; padding: 48px 20px; border-radius: 24px; background: var(--paper); text-align: center; }
.empty__art { position: relative; width: 120px; height: 70px; }
.empty__art i { position: absolute; bottom: 0; width: 52px; height: 64px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-s); animation: fl-bob 3s ease-in-out infinite; }
.empty__art i:nth-child(1) { left: 0; transform: rotate(-10deg); background: var(--cat-design-s); }
.empty__art i:nth-child(2) { left: 34px; z-index: 1; animation-delay: -.6s; }
.empty__art i:nth-child(3) { right: 0; transform: rotate(10deg); background: var(--cat-tech-s); animation-delay: -1.2s; }
@keyframes fl-bob { 50% { translate: 0 -6px; } }
.empty__t { max-width: 26em; font-weight: 700; font-size: 18px; color: var(--ink); }

.hire { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 28px; padding: 22px 24px; border-radius: 24px; background: linear-gradient(120deg, #fff1da, #ffe4de); box-shadow: inset 0 0 0 1px rgba(250, 162, 27, .35); }
.hire__t { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; color: var(--ink); }
.hire__p { margin-top: 4px; max-width: 34em; font-size: 16px; color: var(--text); }
.res__note { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  .fc.is-in, .fc__act.is-today i, .empty__art i { animation: none; }
}

/* phone pass: 16px sort menu, so iOS does not zoom the page when it opens */
@media (max-width: 767px) { .res__sort .inp { font-size: 16px; } }
