/* Maid list. Everything here reads the WordPress theme's tokens (tokens.css), so the colour-theme
   switch, fonts, radii and shadows follow the main site automatically. No hard-coded brand colours. */

/* ---------- hero (compact version of the theme's page hero) ---------- */
.ml-hero { padding: 40px 0 44px; }
.ml-hero .mf-crumbs { margin-bottom: 18px; }
.ml-hero h1 { max-width: 26ch; font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 14px; }
.ml-hero__in { position: relative; }
.ml-hero__copy { max-width: 78ch; }
.ml-hero .mf-lead { max-width: none; font-size: 16px; margin: 0; }
.ml-hero .mf-lead a { color: var(--mf-accent); text-decoration: underline; text-underline-offset: 3px; }
.ml-hero .mf-lead[data-clamped="true"] { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ml-hero__toggle { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--mf-accent); font: var(--mf-w-button) 14px/1 var(--mf-font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ml-hero__toggle[hidden] { display: none; }

.ml-quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.ml-pill { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: var(--mf-radius-pill); border: 1px solid color-mix(in srgb, var(--mf-accent) 50%, transparent); font-size: 14px; font-weight: var(--mf-w-label); line-height: 1; color: var(--mf-accent); text-decoration: none !important; white-space: nowrap; transition: background .25s var(--mf-ease), color .25s, border-color .25s; }
.ml-pill:hover { background: color-mix(in srgb, var(--mf-accent) 18%, transparent); }
.ml-pill.is-active { background: var(--mf-accent); color: var(--mf-chrome); border-color: var(--mf-accent); }

/* ---------- layout ---------- */
.ml { padding: 36px 0 calc(var(--mf-section-y) * .9); min-height: 70vh; }
.ml-layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 32px; align-items: start; }
.ml-main { min-width: 0; }

/* ---------- filter panel ---------- */
.ml-filters { position: sticky; top: calc(var(--mf-nav-h) + 16px); max-height: calc(100vh - var(--mf-nav-h) - 32px); display: flex; flex-direction: column; background: var(--mf-surface); border: 1px solid var(--mf-border); border-radius: var(--mf-radius); box-shadow: var(--mf-shadow); overflow: hidden; }
.ml-filters__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 14px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--mf-text) 25%, transparent) transparent; }
.ml-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 12px; position: sticky; top: 0; z-index: 2; background: var(--mf-surface); }
.ml-filters__head h2 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.ml-filters__reset { font-size: 13px; font-weight: var(--mf-w-button); color: var(--mf-primary); text-decoration: underline; text-underline-offset: 3px; }
.ml-filters__apply { display: none; padding: 14px 18px; border-top: 1px solid var(--mf-border); background: var(--mf-surface); }

.ml-search { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 0 14px; border: 1.5px solid var(--mf-border); border-radius: var(--mf-radius-pill); background: var(--mf-bg); color: var(--mf-text-muted); transition: border-color .2s, box-shadow .2s, background .2s; }
.ml-search:focus-within { border-color: var(--mf-primary); background: var(--mf-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mf-primary) 14%, transparent); }
.ml-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 0; font: var(--mf-w-label) 14.5px/1.2 var(--mf-font); color: var(--mf-text); }

.ml-group { border-top: 1px solid var(--mf-border); }
.ml-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 15px 2px; cursor: pointer; font-size: 15px; font-weight: var(--mf-w-heading); color: var(--mf-text); user-select: none; }
.ml-group > summary::-webkit-details-marker { display: none; }
.ml-group > summary span { flex: 1; }
.ml-group > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--mf-text-muted); border-bottom: 2px solid var(--mf-text-muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .3s var(--mf-ease); }
.ml-group[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.ml-group__n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--mf-radius-pill); background: var(--mf-primary); color: var(--mf-on-primary); font-size: 12px; line-height: 22px; text-align: center; font-weight: var(--mf-w-button); }
.ml-group__n:empty { display: none; }
.ml-group__body { display: flex; flex-direction: column; gap: 2px; padding: 0 0 14px; }
.ml-group__body.is-long { max-height: 260px; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.ml-group__find { position: sticky; top: 0; z-index: 1; width: 100%; margin-bottom: 6px; padding: 9px 14px; border: 1.5px solid var(--mf-border); border-radius: var(--mf-radius-pill); background: var(--mf-surface); font: var(--mf-w-label) 13.5px/1.2 var(--mf-font); color: var(--mf-text); }
.ml-group__find:focus { outline: 0; border-color: var(--mf-primary); }

.ml-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--mf-radius-sm); cursor: pointer; font-size: 14.5px; line-height: 1.3; transition: background .2s; }
.ml-opt:hover { background: var(--mf-accent-soft); }
.ml-opt[hidden] { display: none; }
.ml-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ml-opt__box { flex: 0 0 20px; height: 20px; display: grid; place-items: center; border: 1.6px solid color-mix(in srgb, var(--mf-text) 35%, transparent); border-radius: 6px; background: var(--mf-surface); transition: background .2s, border-color .2s; }
.ml-opt input:checked + .ml-opt__box { background: var(--mf-primary); border-color: var(--mf-primary); }
.ml-opt input:checked + .ml-opt__box::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--mf-on-primary); border-bottom: 2px solid var(--mf-on-primary); transform: rotate(-45deg) translate(1px, -1px); }
.ml-opt input:focus-visible + .ml-opt__box { outline: 3px solid var(--mf-accent); outline-offset: 2px; }
.ml-opt__label { flex: 1; min-width: 0; }
.ml-opt input:checked ~ .ml-opt__label { font-weight: var(--mf-w-button); }
.ml-count { padding: 1px 9px; border-radius: var(--mf-radius-pill); background: var(--mf-bg); color: var(--mf-text-muted); font-size: 12px; font-weight: var(--mf-w-label); font-variant-numeric: tabular-nums; }
.ml-opt.is-empty { opacity: .42; }

/* ---------- toolbar + chips ---------- */
.ml-toolbar { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.ml-count-line { flex: 1; margin: 0; font-size: 15px; color: var(--mf-text-muted); }
.ml-count-line b { color: var(--mf-text); font-weight: var(--mf-w-heading); }
.ml-sort { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--mf-text-muted); }
.ml-toolbar__filters { display: none; }
.ml-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--mf-radius-pill); background: var(--mf-primary); color: var(--mf-on-primary); font-size: 11.5px; font-weight: var(--mf-w-button); }
.ml-badge[hidden] { display: none; }
.ml-toolbar__filters:hover .ml-badge { background: var(--mf-on-primary); color: var(--mf-primary); }

.ml-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ml-chips:empty { display: none; }
.ml-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border: 0; border-radius: var(--mf-radius-pill); background: var(--mf-accent-soft); color: var(--mf-text); font: var(--mf-w-button) 13.5px/1 var(--mf-font); cursor: pointer; transition: background .2s, color .2s; }
.ml-chip span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--mf-text) 14%, transparent); font-size: 14px; line-height: 1; }
.ml-chip:hover { background: var(--mf-primary); color: var(--mf-on-primary); }
.ml-chip:hover span { background: color-mix(in srgb, var(--mf-on-primary) 25%, transparent); }
.ml-chip--clear { background: none; padding: 8px 6px; color: var(--mf-primary); text-decoration: underline; text-underline-offset: 3px; }
.ml-chip--clear:hover { background: none; color: var(--mf-chrome); }

/* ---------- results grid ---------- */
.ml-results { position: relative; min-height: 60vh; }                 /* reserves space so nothing jumps while a response is in flight */
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 22px; }
.ml-results.is-loading .ml-grid { opacity: .5; pointer-events: none; transition: opacity .15s; }
.ml-results.is-loading::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--mf-accent), transparent) no-repeat; background-size: 40% 100%; animation: ml-bar 1s linear infinite; }
@keyframes ml-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ml-more { display: flex; justify-content: center; padding: 36px 0 4px; }
.ml-more[hidden], .ml-end[hidden] { display: none; }
.ml-more.is-loading .mf-btn { opacity: .6; pointer-events: none; }
.ml-end { padding: 36px 0 4px; text-align: center; color: var(--mf-text-muted); font-size: 14.5px; }
.ml-empty { grid-column: 1 / -1; text-align: center; padding: 64px 24px; border: 1.5px dashed var(--mf-border); border-radius: var(--mf-radius); background: var(--mf-surface); color: var(--mf-text-muted); }
.ml-empty svg { margin: 0 auto 14px; color: var(--mf-accent-ink); }
.ml-empty h3 { margin: 0 0 6px; font-size: 22px; color: var(--mf-text); }
.ml-empty p { margin: 0 0 22px; }

/* ---------- maid card (same family as the theme's .mf-maid) ---------- */
.ml-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--mf-surface); border: 1px solid var(--mf-border); border-radius: 20px; transition: box-shadow .4s var(--mf-ease), border-color .4s, transform .4s var(--mf-ease); }
.ml-card:hover { box-shadow: var(--mf-shadow-lg); border-color: color-mix(in srgb, var(--mf-accent) 60%, transparent); transform: translateY(-3px); }
.ml-card.ml-new { animation: ml-in .35s var(--mf-ease) both; }          /* only freshly loaded cards animate; restored ones must not flash */
@keyframes ml-in { from { opacity: 0; transform: translateY(8px); } }
.ml-card__photo { position: relative; aspect-ratio: 1 / .95; background: var(--mf-accent-soft); overflow: hidden; }
.ml-card__initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 76px; font-weight: var(--mf-w-hero); color: var(--mf-primary); }
.ml-card__link { position: absolute; inset: 0; }
.ml-card__link img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; transition: transform .8s var(--mf-ease); }
.ml-card:hover .ml-card__link img { transform: scale(1.04); }
.ml-card__nat { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 8px; border-radius: var(--mf-radius-pill); background: color-mix(in srgb, var(--mf-surface) 94%, transparent); backdrop-filter: blur(6px); color: var(--mf-chrome); font-size: 12.5px; font-weight: var(--mf-w-button); }
.ml-card__nat img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.ml-card__nat:not(:has(img)) { padding-left: 13px; }
.ml-card__badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; border-radius: var(--mf-radius-pill); background: var(--mf-chrome); color: var(--mf-accent); font-size: 12px; font-weight: var(--mf-w-button); letter-spacing: .01em; }
.ml-card__badge--hired { background: var(--mf-text); color: var(--mf-bg); padding-left: 11px; }
.ml-card__badge + .ml-card__badge { left: auto; right: 12px; }
.ml-fav { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--mf-surface) 94%, transparent); backdrop-filter: blur(6px); color: var(--mf-primary); cursor: pointer; transition: transform .25s var(--mf-ease), background .25s, color .25s; }
.ml-fav svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ml-fav:hover { transform: scale(1.08); }
.ml-fav:active { transform: scale(.92); }
.ml-fav.is-on { background: var(--mf-primary); color: var(--mf-on-primary); }
.ml-fav.is-on svg { fill: currentColor; }
.ml-card__play { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--mf-chrome); color: var(--mf-accent); cursor: pointer; transition: background .3s var(--mf-ease), color .3s; }
.ml-card__play svg { margin-left: 2px; }
.ml-card__play:hover { background: var(--mf-accent); color: var(--mf-chrome); }

.ml-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 18px; }
.ml-card__name { margin: 0; font-size: 20px; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-card__name a { color: var(--mf-text); text-decoration: none; }
.ml-card__name a:hover { color: var(--mf-primary); }
.ml-card__loc { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13.5px; color: var(--mf-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-card__loc svg { flex: none; color: var(--mf-accent-ink); }
.ml-card__role { margin: 10px 0 12px; font-size: 12px; font-weight: var(--mf-w-button); letter-spacing: .08em; text-transform: uppercase; line-height: 1.45; color: var(--mf-primary); }
.ml-card__salary { display: flex; align-items: baseline; gap: 6px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--mf-accent-soft); }
.ml-card__salary b { font-size: 24px; font-weight: var(--mf-w-hero); letter-spacing: -.03em; color: var(--mf-primary); white-space: nowrap; }
.ml-card__salary small { font-size: 12.5px; font-weight: var(--mf-w-button); color: var(--mf-text-muted); }
.ml-card__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; }
.ml-card__facts div { min-width: 0; }
.ml-card__facts dt { font-size: 11.5px; font-weight: var(--mf-w-button); letter-spacing: .08em; text-transform: uppercase; color: var(--mf-text-muted); }
.ml-card__facts dd { margin: 2px 0 0; font-size: 14px; font-weight: var(--mf-w-button); color: var(--mf-text); }
.ml-card__skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.ml-card__skills li { padding: 5px 11px; border-radius: var(--mf-radius-pill); border: 1px solid var(--mf-border); font-size: 12.5px; font-weight: var(--mf-w-label); color: var(--mf-text-muted); }
.ml-card__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.ml-card__contact a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--mf-radius-sm); background: var(--mf-bg); color: var(--mf-text); font-size: 13.5px; font-weight: var(--mf-w-button); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; transition: background .2s; }
.ml-card__contact a span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mf-text-muted); }
.ml-card__contact a:hover { background: var(--mf-accent-soft); }
.ml-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.ml-card__actions .mf-btn { padding: 12px 10px; }

.ml-scrim[hidden] { display: none; }
body.ml-lock .mf-aya, body.ml-lock .mf-top { display: none; }

/* ---------- tablet / phone: filters become a bottom sheet ---------- */
@media (max-width: 1023px) {
  .ml-layout { grid-template-columns: minmax(0, 1fr); }
  .ml-toolbar { flex-wrap: wrap; }
  .ml-toolbar__filters { display: inline-flex; }
  .ml-count-line { order: 3; flex-basis: 100%; }
  .ml-sort { margin-left: auto; }
  .ml-filters { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 88vh; z-index: 120; border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -16px 48px rgba(20, 12, 14, .35); transform: translateY(105%); transition: transform .4s var(--mf-ease); }
  .ml-filters.is-open { transform: none; }
  .ml-filters__apply { display: block; }
  .ml-scrim { position: fixed; inset: 0; z-index: 110; background: rgba(20, 12, 14, .55); backdrop-filter: blur(3px); }
}
@media (max-width: 767px) {
  .ml-hero { padding: 28px 0 32px; }
  .ml { padding-top: 24px; }
  .ml-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ml-card__photo { aspect-ratio: 1 / .78; }
  .ml-quick { gap: 8px; margin-top: 20px; }
  .ml-pill { padding: 8px 13px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .ml *, .ml-card { animation: none !important; transition: none !important; } }

.ml .visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ml-search input { text-overflow: ellipsis; }

/* ---------- view toggle ---------- */
.ml-view { display: inline-flex; padding: 3px; border: 1.5px solid var(--mf-border); border-radius: var(--mf-radius-pill); background: var(--mf-surface); }
.ml-view button { width: 38px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--mf-radius-pill); background: none; color: var(--mf-text-muted); cursor: pointer; transition: background .25s var(--mf-ease), color .25s; }
.ml-view button[aria-pressed="true"] { background: var(--mf-primary); color: var(--mf-on-primary); }
.ml-card__tick, .ml-card__hiredtag { display: none; }

/* ---------- gallery (grid) view: same card, shorter photo ---------- */

/* ---------- compact (list) view: small photo beside the details ---------- */
html[data-ml-view="compact"] .ml-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 16px; }
html[data-ml-view="compact"] .ml-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; align-content: start; padding: 14px; border-radius: 18px; }
html[data-ml-view="compact"] .ml-card:hover { transform: translateY(-2px); }
html[data-ml-view="compact"] .ml-card__body { display: contents; }

html[data-ml-view="compact"] .ml-card__photo { grid-column: 1; grid-row: 1 / span 4; aspect-ratio: auto; min-height: 132px; border-radius: 14px; }
html[data-ml-view="compact"] .ml-card__initial { font-size: 42px; }
html[data-ml-view="compact"] .ml-card__nat { left: 6px; bottom: 6px; top: auto; padding: 3px 9px 3px 5px; gap: 5px; font-size: 11px; max-width: calc(100% - 12px); }
html[data-ml-view="compact"] .ml-card__nat img { width: 13px; height: 13px; }
html[data-ml-view="compact"] .ml-card__nat:not(:has(img)) { padding-left: 9px; }
html[data-ml-view="compact"] .ml-card__badge { display: none; }
html[data-ml-view="compact"] .ml-fav { top: 6px; right: 6px; width: 30px; height: 30px; }
html[data-ml-view="compact"] .ml-fav svg { width: 16px; height: 16px; }
html[data-ml-view="compact"] .ml-card__play { top: 6px; left: 6px; right: auto; bottom: auto; width: 30px; height: 30px; }
html[data-ml-view="compact"] .ml-card__play svg { width: 11px; height: 11px; }

html[data-ml-view="compact"] .ml-card__name { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 7px; font-size: 18px; min-width: 0; }
html[data-ml-view="compact"] .ml-card__name a { overflow: hidden; text-overflow: ellipsis; }
html[data-ml-view="compact"] .ml-card__tick { display: block; flex: none; color: var(--mf-accent-ink); }
html[data-ml-view="compact"] .ml-card__hiredtag { display: inline-block; flex: none; padding: 2px 9px; border-radius: var(--mf-radius-pill); background: var(--mf-text); color: var(--mf-bg); font-size: 11px; font-weight: var(--mf-w-button); }
html[data-ml-view="compact"] .ml-card__loc { grid-column: 2; grid-row: 2; margin-top: 3px; font-size: 13px; }
html[data-ml-view="compact"] .ml-card__role { grid-column: 2; grid-row: 3; margin: 8px 0 0; font-size: 11px; letter-spacing: .07em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-ml-view="compact"] .ml-card__salary { grid-column: 2; grid-row: 4; align-self: end; margin: 8px 0 0; padding: 0; background: none; }
html[data-ml-view="compact"] .ml-card__salary b { font-size: 22px; }

html[data-ml-view="compact"] .ml-card__facts { grid-column: 1 / -1; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--mf-border); gap: 6px 22px; }
html[data-ml-view="compact"] .ml-card__skills { grid-column: 1 / -1; margin: 12px 0 0; }
html[data-ml-view="compact"] .ml-card__contact { grid-column: 1 / -1; margin: 12px 0 0; }
html[data-ml-view="compact"] .ml-card__actions { grid-column: 1 / -1; margin-top: 14px; }
html[data-ml-view="compact"] .ml-card__actions .mf-btn { padding: 10px; }

@media (max-width: 767px) {
  html[data-ml-view="compact"] .ml-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; padding: 12px; }
  html[data-ml-view="compact"] .ml-card__photo { min-height: 120px; }
  html[data-ml-view="compact"] .ml-card__name { font-size: 17px; }
  .ml-view button { width: 34px; }
}

/* ---------- sort: the theme's custom select, styled as a pill ---------- */
.ml-sort .mf-sel { min-width: 190px; }
.ml-sort .mf-sel__btn { padding: 10px 16px; border: 1.5px solid var(--mf-border); border-radius: var(--mf-radius-pill); background: var(--mf-surface); font: var(--mf-w-button) 14px/1 var(--mf-font); color: var(--mf-text); gap: 10px; justify-content: space-between; transition: border-color .2s; }
.ml-sort .mf-sel__btn:hover, .ml-sort .mf-sel.is-open .mf-sel__btn { border-color: var(--mf-primary); }
.ml-sort .mf-sel__list { left: auto; right: 0; top: calc(100% + 8px); min-width: 100%; width: max-content; }

/* ---------- video modal ---------- */
.ml-vid { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(20, 12, 14, .86); backdrop-filter: blur(6px); animation: ml-fade .25s var(--mf-ease); }
@keyframes ml-fade { from { opacity: 0; } }
.ml-vid__box { width: min(920px, 100%); }
.ml-vid__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: var(--mf-on-chrome); }
.ml-vid__bar p { margin: 0; font-weight: var(--mf-w-heading); font-size: 17px; }
.ml-vid__bar button { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--mf-surface); color: var(--mf-text); font-size: 24px; line-height: 1; cursor: pointer; transition: transform .25s var(--mf-ease); }
.ml-vid__bar button:hover { transform: rotate(90deg); }
.ml-vid__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--mf-radius); overflow: hidden; background: #000; }
.ml-vid__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- grid (gallery) view: short poster card, name sits on the photo ---------- */
html[data-ml-view="gallery"] .ml-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 244px), 1fr)); gap: 18px; }
html[data-ml-view="gallery"] .ml-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto auto auto 1fr; border-radius: 18px; }
html[data-ml-view="gallery"] .ml-card__body { display: contents; }

html[data-ml-view="gallery"] .ml-card__photo { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 16 / 10; }
html[data-ml-view="gallery"] .ml-card__photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 62%; background: linear-gradient(to top, rgba(20, 12, 14, .82), transparent); pointer-events: none; }
html[data-ml-view="gallery"] .ml-card__initial { font-size: 54px; }
html[data-ml-view="gallery"] .ml-card__link img { object-position: 50% 18%; }
html[data-ml-view="gallery"] .ml-card__badge { display: none; }
html[data-ml-view="gallery"] .ml-card__nat { left: 10px; top: 10px; padding: 4px 11px 4px 6px; font-size: 11.5px; }
html[data-ml-view="gallery"] .ml-fav { top: 10px; right: 10px; width: 32px; height: 32px; }
html[data-ml-view="gallery"] .ml-fav svg { width: 17px; height: 17px; }
html[data-ml-view="gallery"] .ml-card__play { right: 10px; bottom: 10px; width: 34px; height: 34px; z-index: 3; }
html[data-ml-view="gallery"] .ml-card__play svg { width: 12px; height: 12px; }

html[data-ml-view="gallery"] .ml-card__name { grid-column: 1 / -1; grid-row: 1; align-self: end; z-index: 2; display: flex; align-items: center; gap: 7px; padding: 0 56px 11px 14px; font-size: 18px; pointer-events: none; }
html[data-ml-view="gallery"] .ml-card__name a { color: #fff; pointer-events: auto; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
html[data-ml-view="gallery"] .ml-card__name a:hover { color: var(--mf-accent); }
html[data-ml-view="gallery"] .ml-card__tick { display: block; flex: none; color: var(--mf-accent); }
html[data-ml-view="gallery"] .ml-card__hiredtag { display: inline-block; flex: none; padding: 2px 9px; border-radius: var(--mf-radius-pill); background: var(--mf-accent); color: var(--mf-chrome); font-size: 11px; font-weight: var(--mf-w-button); }

html[data-ml-view="gallery"] .ml-card__loc { grid-column: 1; grid-row: 2; align-self: center; margin: 0; padding: 12px 0 0 14px; font-size: 12.5px; }
html[data-ml-view="gallery"] .ml-card__salary { grid-column: 2; grid-row: 2; align-self: center; margin: 0; padding: 12px 14px 0 8px; background: none; gap: 4px; }
html[data-ml-view="gallery"] .ml-card__salary b { font-size: 18px; }
html[data-ml-view="gallery"] .ml-card__salary small { font-size: 11.5px; }
html[data-ml-view="gallery"] .ml-card__role { grid-column: 1 / -1; grid-row: 3; margin: 7px 14px 0; font-size: 10.5px; letter-spacing: .07em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ml-view="gallery"] .ml-card__facts { grid-column: 1 / -1; grid-row: 4; flex-wrap: nowrap; gap: 0; margin: 8px 14px 0; font-size: 12.5px; overflow: hidden; }
html[data-ml-view="gallery"] .ml-card__facts dt { display: none; }
html[data-ml-view="gallery"] .ml-card__facts div { flex: none; }
html[data-ml-view="gallery"] .ml-card__facts div:first-child { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-ml-view="gallery"] .ml-card__facts div + div::before { content: "\00B7"; margin: 0 7px; color: var(--mf-text-muted); }
html[data-ml-view="gallery"] .ml-card__facts dd { display: inline; margin: 0; font-size: 12.5px; color: var(--mf-text-muted); font-weight: var(--mf-w-label); }
html[data-ml-view="gallery"] .ml-card__skills { grid-column: 1 / -1; grid-row: 5; flex-wrap: nowrap; overflow: hidden; margin: 10px 14px 0; }
html[data-ml-view="gallery"] .ml-card__skills li { flex: none; padding: 4px 10px; font-size: 11.5px; }
html[data-ml-view="gallery"] .ml-card__skills li:nth-child(n+4) { display: none; }
html[data-ml-view="gallery"] .ml-card__contact { grid-column: 1 / -1; grid-row: 6; margin: 10px 14px 0; }
html[data-ml-view="gallery"] .ml-card__actions { grid-column: 1 / -1; grid-row: 7; align-self: end; margin: 14px 14px 14px; gap: 8px; }
html[data-ml-view="gallery"] .ml-card__actions .mf-btn { padding: 10px 8px; font-size: 13.5px; }
html[data-ml-view="gallery"] .ml-card__posted, html[data-ml-view="gallery"] .ml-card__per { display: none; }

/* mobile polish: fields 16px, labels never below 12px, tappable toggle */
@media (max-width: 767px) {
  .ml-group__find, .ml-opt, .ml-search input, #ml-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select { font-size: 16px; }
  .ml-card__facts dt, html[data-ml-view="compact"] .ml-card__nat, html[data-ml-view="compact"] .ml-card__role { font-size: 12px; }
  .ml-hero__toggle { min-height: 44px; display: inline-flex; align-items: center; padding: 0; }
}

/* smooth scrolling: while the page is moving, cards slide under a stationary mouse. Letting them react to hover each frame
   (big shadow + lift + image zoom on dozens of cards) is what made scrolling feel shaky; they ignore the pointer until it stops */
html.mf-moving .ml-card, html.mf-moving .ml-card * { pointer-events: none; }

/* the filter sheet gets a visible way out */
.ml-filters__x { display: none; width: 44px; height: 44px; margin: -8px -10px -8px 4px; padding: 0; border: 0; border-radius: 50%; background: var(--mf-bg); color: var(--mf-text); cursor: pointer; place-items: center; }
@media (max-width: 1023px) { .ml-filters__x { display: grid; } .ml-filters__head { gap: 8px; } .ml-filters__reset { margin-left: auto; } }
