:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --grigio: #f5f5f3;
  --bordo: #e8e7e3;
  --bordo-2: #dcdad4;
  --testo: #16161a;
  --testo-2: #5f5e66;
  --testo-3: #a09fa7;
  --accento: #4f46e5;        /* the single accent: the selected start, the focus of the field, the ticks */
  --accento-chiaro: #eeedfd;
  --pillola: #16161a;        /* the Hire me pill */
  --ombra: 24, 22, 40;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(11px, min(3.4vw, 2.45vh), 16px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
svg { display: block; }

.stage { height: 100vh; display: grid; place-items: center; padding: 2vh 3vw; }

/* the frame is as big as the open request: the closed button sits in its middle, the open one fills it */
.frame { width: min(20em, 92vw); position: relative; }
.mover { display: flex; flex-direction: column; align-items: center; }

/* the availability line above the pill */
.stato {
  display: flex; align-items: center; gap: .45em;
  font-size: .82em; color: var(--testo-2);
  height: 1.6em; margin-bottom: .75em;
}
.cal { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.cal__tick { stroke: var(--accento); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; }
.stato__box { position: relative; display: block; height: 1.3em; overflow: hidden; }
.stato__l { position: absolute; top: 0; bottom: 0; left: 0; width: max-content; display: flex; align-items: center; white-space: nowrap; }
.stato__l b { font-weight: 600; color: var(--testo); margin-left: .28em; font-variant-numeric: tabular-nums; }
.stato__l[data-st="1"] { opacity: 0; }

/* the pill: two labels out of the flow, so the hidden one never widens the cell */
.pill {
  position: relative; width: 10.5em; height: 3.2em; border-radius: 999px;
  color: #fff; isolation: isolate;
}
.pill__fondo {
  position: absolute; inset: 0; border-radius: inherit; background: var(--pillola); z-index: -1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(var(--ombra), .18), 0 8px 20px -8px rgba(var(--ombra), .5);
}
.pill__vista { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.pill__l {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .45em;
  font-weight: 600; font-size: 1.02em; letter-spacing: -.005em; white-space: nowrap;
}
.pill__l[data-pl="1"] { opacity: 0; }
.arrow, .ok { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ok path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pill:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

/* the request panel under the pill */
.panel {
  width: 100%; margin-top: .8em;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 1.1em;
  box-shadow: 0 1px 1px rgba(var(--ombra), .04), 0 12px 30px -10px rgba(var(--ombra), .16), 0 30px 60px -34px rgba(var(--ombra), .22);
  visibility: hidden;
}
.panel__in { padding: 1em 1.05em 1.05em; display: flex; flex-direction: column; }

.head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65em; margin-bottom: .95em; }
.ava {
  width: 2.2em; height: 2.2em; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grigio); border: 1px solid var(--bordo);
  font-size: .78em; font-weight: 650; letter-spacing: .02em; color: var(--testo);
  width: 2.6em; height: 2.6em;
}
.head__t { display: grid; line-height: 1.25; min-width: 0; }
.head__name { font-weight: 600; font-size: .95em; }
.head__sub { font-size: .76em; color: var(--testo-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; color: var(--testo-2); }
.x svg { width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (hover: hover) { .x:hover { background: var(--grigio); } }

.lab { display: block; font-size: .74em; font-weight: 550; color: var(--testo-2); margin-bottom: .45em; }

.chips {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--grigio); border: 1px solid var(--bordo); border-radius: .8em; padding: .2em;
  margin-bottom: .9em; isolation: isolate;
}
.chips__sel {
  position: absolute; top: .2em; bottom: .2em; left: .2em; z-index: -1;
  border-radius: .62em; background: #fff;
  box-shadow: 0 0 0 1px rgba(79,70,229,.35), 0 1px 2px rgba(var(--ombra), .12), 0 4px 10px -4px rgba(var(--ombra), .2);
}
.chip {
  height: 2.1em; border-radius: .62em; display: grid; place-items: center;
  font-size: .86em; font-weight: 550; color: var(--testo-2); font-variant-numeric: tabular-nums;
  transition: color .25s;
}
.chip[aria-checked="true"] { color: var(--accento); }
.chip:focus-visible { outline: 2px solid var(--accento); outline-offset: 1px; }

.field {
  display: flex; align-items: center; gap: .55em;
  height: 2.6em; padding: 0 .8em;
  border: 1px solid var(--bordo-2); border-radius: .75em; background: #fff;
  transition: border-color .25s, box-shadow .25s;
}
.field.is-on { border-color: var(--accento); box-shadow: 0 0 0 3px var(--accento-chiaro); }
.field.is-err { border-color: #d14b4b; box-shadow: 0 0 0 3px #fbe9e9; }
.field__ico { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: var(--testo-3); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.field input { flex: 1; min-width: 0; height: 100%; outline: none; font-size: .9em; }
.field input::placeholder { color: var(--testo-3); }
.hint { height: 1.25em; font-size: .7em; color: #c24141; padding: .25em 0 0 .2em; }

.slot { position: relative; height: 2.9em; margin-top: .35em; }
.send {
  position: absolute; inset: 0; border-radius: .8em;
  background: var(--accento); color: #fff; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(var(--ombra), .2), 0 8px 18px -10px rgba(79,70,229,.7);
}
.send__l { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: .92em; white-space: nowrap; }
.send__l[data-sl="1"] { opacity: 0; }
.send__run { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.85); transform: scaleX(0); transform-origin: 0 50%; }
.send:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

.done {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5em;
  border-radius: .8em; background: var(--accento-chiaro); color: var(--testo);
  font-size: .84em; font-weight: 550; white-space: nowrap; opacity: 0; visibility: hidden;
}
.done__ok { width: 1.45em; height: 1.45em; border-radius: 50%; background: var(--accento); color: #fff; display: grid; place-items: center; flex: none; }
.done__ok svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.done__ok path { stroke-dasharray: 1; stroke-dashoffset: 1; }
