/* The freelancer card with the skills that reorder for the brief, on pure black. Every size is in em and the card's
   font size follows both the width and the height of the window, so the whole card fits the phone box. */
:root {
  --page: #000000;          /* the page */
  --card: #0e0e11;          /* the body of the card */
  --card-top: #16161b;      /* the top of its gradient */
  --edge: rgba(255, 255, 255, 0.08); /* its edge at rest */
  --ink: #f1f1f3;           /* the words */
  --muted: #8b8b96;         /* the small words */
  --faint: #55555f;         /* the skills the brief does not need */
  --accent: #c9f26b;        /* the accent: the lit skills, the match, the button */
  --accent-ink: #0b0d05;    /* the words on the accent */
  --pill: #18181d;          /* a skill pill at rest */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

/* ---------- the card ---------- */
.free {
  --mx: 70%;
  --my: 0%;
  position: relative;
  width: min(23em, calc(100vw - 24px));
  font-size: clamp(10px, min(3.35vh, 4.3vw), 15px);
  padding: 0 1.1em 1.1em;
  border-radius: 1.5em;
  background: linear-gradient(180deg, var(--card-top), var(--card) 46%);
  box-shadow:
    0 0 0 1px var(--edge),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 18px 40px -12px rgba(0, 0, 0, 0.8),
    0 40px 90px -30px color-mix(in srgb, var(--glow, #c9f26b) 22%, transparent);
  opacity: 0;
  isolation: isolate;
}

/* the edge catching the light where the pointer is */
.free__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(14em 10em at var(--mx) var(--my), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* ---------- the cover art ---------- */
.free__cover {
  position: relative;
  height: 4.4em;
  margin: 0 -1.1em;
  border-radius: 1.5em 1.5em 0 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(180deg, #000 58%, transparent);
  mask: linear-gradient(180deg, #000 58%, transparent);
}

.free__art {
  display: block;
  width: 100%;
  height: 100%;
}

.free__art [data-blob] {
  fill: var(--accent);
}

.free__arcs circle {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.6;
}

.free__avail {
  position: absolute;
  top: 0.75em;
  right: 0.8em;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.32em 0.65em 0.32em 0.5em;
  border-radius: 99px;
  font-size: 0.74em;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 10, 12, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
}

.free__avail svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
}

/* ---------- who ---------- */
.free__id {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 0.75em;
  margin-top: -1.7em;
}

.free__avatar {
  position: relative;
  width: 3.6em;
  height: 3.6em;
  border-radius: 50%;
  padding: 0.2em;
  background: var(--card-top);
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.7);
}

.free__avatar-art {
  position: absolute;
  inset: 0.2em;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 32%),
    conic-gradient(from 210deg, #2c2c35, #6d6d7d, #26262d, #9898a6, #2c2c35);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.free__initials {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 1.05em;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.free__who {
  min-width: 0;
  padding-bottom: 0.15em;
}

.free__name {
  margin: 0;
  font-size: 1.22em;
  font-weight: 640;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.free__role {
  margin: 0.15em 0 0;
  font-size: 0.8em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.free__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  margin: 0 0 0.35em;
  font-size: 0.8em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.free__rating svg {
  width: 1.05em;
  height: 1.05em;
  fill: var(--accent);
}

.free__reviews {
  color: var(--muted);
  font-weight: 450;
}

.free__reviews::before {
  content: '(';
}

.free__reviews::after {
  content: ')';
}

/* ---------- the briefs ---------- */
.free__briefs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1em;
  padding: 0.22em;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.free__thumb {
  position: absolute;
  top: 0.22em;
  bottom: 0.22em;
  left: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 4px 10px -3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.free__tab {
  position: relative;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.55em 0.2em;
  background: none;
  font: inherit;
  font-size: 0.8em;
  font-weight: 560;
  color: var(--muted);
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.25s;
  white-space: nowrap;
}

.free__tab[aria-selected='true'] {
  color: var(--ink);
}

.free__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------- the match ---------- */
.free__match {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7em;
  margin-top: 0.9em;
  font-size: 0.8em;
}

.free__match-label {
  color: var(--muted);
}

.free__track {
  position: relative;
  height: 0.28em;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.free__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 40%, transparent), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.free__score {
  display: inline-flex;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  height: 1.2em;
  line-height: 1.2em;
  overflow: hidden;
}

.free__score > span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
}

.free__digit {
  display: block;
  height: 1.2em;
  overflow: hidden;
}

.free__reel {
  display: flex;
  flex-direction: column;
}

.free__reel span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  text-align: center;
}

/* ---------- the skills ---------- */
.free__skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.42em;
  margin: 0.85em 0 0;
  padding: 0;
  height: 5.6em;
}

.free__skill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.38em;
  height: 2.1em;
  padding: 0 0.8em;
  border-radius: 99px;
  font-size: 0.8em;
  font-weight: 520;
  white-space: nowrap;
  color: var(--faint);
  background: var(--pill);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: color 0.35s, background-color 0.35s, box-shadow 0.35s;
  cursor: default;
}

.free__skill svg {
  width: 0;
  height: 0.95em;
  margin-right: -0.38em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.free__skill.is-hover {
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset, 0 8px 18px -8px rgba(0, 0, 0, 0.9);
}

.free__skill.is-on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #121215);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent) inset, 0 6px 16px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}

.free__skill.is-on.is-hover {
  color: #e4ff9e;
}

.free__skill.is-on svg {
  width: 0.95em;
  margin-right: 0;
}

.free__skill.is-on.is-lead {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* ---------- the foot ---------- */
.free__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  margin-top: 0.9em;
  padding-top: 0.95em;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.free__rate {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 0.3em;
  margin: 0;
  min-width: 0;
}

.free__amount {
  font-size: 1.4em;
  font-weight: 680;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.free__per {
  font-size: 0.8em;
  color: var(--muted);
}

.free__reply {
  grid-column: 1 / -1;
  font-size: 0.72em;
  color: var(--muted);
  white-space: nowrap;
}

.free__hire {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--accent-ink);
  cursor: pointer;
  border-radius: 99px;
  -webkit-tap-highlight-color: transparent;
}

.free__hire:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.free__hire-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 3em;
  padding: 0 1.15em 0 1.3em;
  border-radius: 99px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 55%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset,
    0 8px 22px -8px color-mix(in srgb, var(--accent) 80%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.free__hire-glint {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  transform: skewX(-18deg) translateX(-120%);
  pointer-events: none;
}

.free__hire-words {
  position: relative;
  display: grid;
  font-size: 0.92em;
  font-weight: 640;
  --w: 100;
  font-stretch: calc(var(--w) * 1%);
  white-space: nowrap;
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
}

.free__hire-words > span {
  grid-area: 1 / 1;
  justify-self: start;
}

.free__hire-icon {
  position: relative;
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.free__check {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* ---------- the pilot's pointer ---------- */
.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #fff;
  stroke: #000;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  .free__skill,
  .free__skill svg,
  .free__tab {
    transition-duration: 0.01s;
  }
}
